:root {
  color-scheme: light dark;
  --bg-canvas: #f5f4ef;
  --bg-surface: #ffffff;
  --bg-subtle: #eceae3;
  --border-default: #c9cdca;
  --font-sans: "Satoshi", Inter, system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --color-teal-600: #006d73;
  --color-teal-700: #004e53;
  --color-ink: #172126;
  --color-ink-muted: #566269;
  --color-focus: #7c3aed;
  --status-approved: #18794e;
  --status-candidate: #9a6700;
  --status-rejected: #b42318;
  --status-trace: #1769aa;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --font-size-ui: 16px;
  --font-size-nav: 14px;
  --shell-pad-block: 10px;
  --shell-pad-inline: 24px;
  --shell-gap: 16px;
  --target-min: 44px;
  --bg: var(--bg-canvas);
  --surface: var(--bg-surface);
  --surface2: var(--bg-subtle);
  --border: var(--border-default);
  --text: var(--color-ink);
  --muted: var(--color-ink-muted);
  --faint: #8a9296;
  --primary: var(--color-teal-600);
  /* Interpretation chips, 11px. Text on the 10% mix with --surface is >= 4.5:1. */
  --interp-open: #9a3412;
  --interp-answered: #166534;
  --interp-unmatched: #374151;
  --interp-neutral: #1e3a5f;
  --primary-hover: var(--color-teal-700);
  /* Stufen der Guides (Symbole der Gliederung): hell = Kurzfassung, mittel = Überblick, dunkel = ausführlich.
     Die hellste Stufe bekommt eine Kontur (--ai-lv-edge), damit sie sich vom Grund abhebt. */
  --ai-lv2: #8dbaf0;
  --ai-lv3: #3a78d4;
  --ai-lv4: #173f80;
  --ai-lv-edge: #2f68bd;

  /* Versions Explorer Grouping Levels (WP-EX Part 2) */
  --ve-g1-bg: #e6f4f2;
  --ve-g1-bar: #006d73;
  --ve-g1-text: #042f2e;
  --ve-g1-muted: #0f595e;

  --ve-g2-bg: #eef2ff;
  --ve-g2-bar: #4f46e5;
  --ve-g2-text: #1e1b4b;
  --ve-g2-muted: #3730a3;

  --ve-g3-bg: #fffbeb;
  --ve-g3-bar: #b45309;
  --ve-g3-border: #d97706;
  --ve-g3-text: #451a03;
  --ve-g3-muted: #78350f;
}
[data-theme="dark"] {
  --ai-lv2: #d3e5fc;
  --ai-lv3: #86b7f4;
  --ai-lv4: #4a86e0;
  --ai-lv-edge: transparent;
  color-scheme: dark;
  --bg-canvas: #12171a;
  --bg-surface: #1c2328;
  --bg-subtle: #262f35;
  --border-default: #3d4a52;
  --color-ink: #e8eeef;
  --color-ink-muted: #a8b3b8;
  --color-focus: #c4b5fd;
  --color-teal-600: #2aa3ab;
  --color-teal-700: #7fd4d8;
  --status-approved: #3dd68c;
  --status-candidate: #f5b942;
  --status-rejected: #fb7185;
  --status-trace: #7dd3fc;
  --faint: #6b767c;

  --ve-g1-bg: #0c2b2e;
  --ve-g1-bar: #2aa3ab;
  --ve-g1-text: #e6fffa;
  --ve-g1-muted: #99f6e4;

  --ve-g2-bg: #1e1b3a;
  --ve-g2-bar: #818cf8;
  --ve-g2-text: #e0e7ff;
  --ve-g2-muted: #a5b4fc;

  --ve-g3-bg: #261f14;
  --ve-g3-bar: #f59e0b;
  --ve-g3-border: #b45309;
  --ve-g3-text: #fef3c7;
  --ve-g3-muted: #fde68a;
  --interp-open: #fdba74;
  --interp-answered: #86efac;
  --interp-unmatched: #d1d5db;
  --interp-neutral: #93c5fd;
}
/* Dichte „Compact“ (interaktive Ansicht) farblich von „Comfortable“ (Grün) abgesetzt: Lila-Blau */
[data-density="compact"] {
  --color-teal-600: #4a4fc7;
  --color-teal-700: #363a9e;
}
[data-theme="dark"][data-density="compact"] {
  --color-teal-600: #8d92f2;
  --color-teal-700: #b9bcff;
}
[data-density="compact"] {
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 10px;
  --space-5: 16px;
  --font-size-ui: 14px;
  --font-size-nav: 13px;
  --shell-pad-block: 6px;
  --shell-pad-inline: 12px;
  --shell-gap: 8px;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--font-size-ui)/1.55 var(--font-sans);
  overflow-x: hidden;
}
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: var(--space-2); top: var(--space-2);
  z-index: 20; padding: var(--space-2) var(--space-3);
  background: var(--bg-surface); color: var(--color-ink);
  border: 2px solid var(--color-focus); border-radius: 4px;
  transform: translateY(-200%);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
header, header.shell {
  background: var(--color-teal-600); color: #fff;
  padding: var(--shell-pad-block) var(--shell-pad-inline);
  display: flex; align-items: center; gap: var(--shell-gap); flex-wrap: nowrap;
  min-width: 0;
}
header .titleblock { display: flex; align-items: center; min-width: 0; }
header .home { color: #fff; font-weight: 700; text-decoration: none; font-size: 18px; white-space: nowrap; }
header .rel { color: #BCE2E7; font-size: 13px; }
nav.crumbs {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 8px 24px; font-size: 14px; color: var(--muted);
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
nav.crumbs a { color: var(--primary); text-decoration: none; }
nav.crumbs a:hover { text-decoration: underline; }
nav.crumbs .shell-universe {
  display: inline-flex; align-items: center; position: relative;
}
nav.crumbs .universe-dropdown {
  position: relative; display: inline-flex; align-items: center;
}
nav.crumbs .universe-dropdown summary.rel {
  color: var(--color-ink, #1f2937); font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 5px;
  background: var(--bg-subtle, #f3f4f6);
  border: 1px solid var(--border-default, #d1d5db);
  user-select: none; list-style: none; white-space: nowrap;
}
[data-theme="dark"] nav.crumbs .universe-dropdown summary.rel {
  color: #fff; background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .15);
}
nav.crumbs .universe-dropdown summary.rel:hover {
  color: var(--primary, #0f766e);
  border-color: var(--primary, #0f766e);
  background: var(--bg-card, #fff);
}
[data-theme="dark"] nav.crumbs .universe-dropdown summary.rel:hover {
  color: #5eead4;
  border-color: #5eead4;
  background: rgba(255, 255, 255, .14);
}
nav.crumbs .universe-dropdown summary.rel .dropdown-caret {
  color: inherit; opacity: .8;
}
nav.crumbs .release-dropdown {
  position: relative; display: inline-flex; align-items: center;
}
nav.crumbs .release-dropdown summary.rel {
  color: var(--color-ink, #1f2937); font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 5px;
  background: var(--bg-subtle, #f3f4f6);
  border: 1px solid var(--border-default, #d1d5db);
  user-select: none; list-style: none; white-space: nowrap;
}
[data-theme="dark"] nav.crumbs .release-dropdown summary.rel {
  color: #fff; background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .15);
}
nav.crumbs .release-dropdown summary.rel:hover {
  color: var(--primary, #0f766e);
  border-color: var(--primary, #0f766e);
  background: var(--bg-card, #fff);
}
[data-theme="dark"] nav.crumbs .release-dropdown summary.rel:hover {
  color: #5eead4;
  border-color: #5eead4;
  background: rgba(255, 255, 255, .14);
}
nav.crumbs .release-dropdown summary.rel .dropdown-caret {
  color: inherit; opacity: .8;
}
nav.crumbs .universe-dropdown .universes,
nav.crumbs .release-dropdown .releases {
  position: absolute; top: calc(100% + 4px); left: 0;
  z-index: 1000;
}
nav.crumbs .releases a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; color: var(--color-ink); text-decoration: none;
  font-size: 13px; font-weight: 500; border-radius: 5px;
}
nav.crumbs .releases a:hover {
  background: var(--bg-subtle, #f3f4f6); color: var(--primary, #0f766e);
}
nav.crumbs .releases a.cur {
  font-weight: 700; color: var(--primary, #0f766e);
  background: var(--bg-subtle, #f3f4f6);
}
[data-theme="dark"] nav.crumbs .releases a {
  color: var(--color-ink, #e8eeef);
}
[data-theme="dark"] nav.crumbs .releases a:hover {
  background: rgba(255, 255, 255, .1); color: #fff;
}
[data-theme="dark"] nav.crumbs .releases a.cur {
  color: #5eead4; background: rgba(255, 255, 255, .15);
}
@media (hover: hover) {
  nav.crumbs details.universe-dropdown:hover,
  nav.crumbs details.universe-dropdown.is-hover-open,
  nav.crumbs details.release-dropdown:hover,
  nav.crumbs details.release-dropdown.is-hover-open {
    z-index: 1001;
  }
  nav.crumbs details.universe-dropdown:hover > .universes,
  nav.crumbs details.universe-dropdown.is-hover-open > .universes,
  nav.crumbs details.release-dropdown:hover > .releases,
  nav.crumbs details.release-dropdown.is-hover-open > .releases {
    display: flex;
  }
}
.is-release-changed {
  outline: 2px solid var(--primary, #0f766e);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--primary, #0f766e) 6%, transparent);
}
nav.crumbs .crumb-start {
  color: var(--muted); font-weight: 500;
}
main { max-width: 1080px; margin: 0 auto; padding: 24px; }
footer {
  max-width: 1080px; margin: 32px auto 24px; padding: 12px 24px;
  color: var(--muted); font-size: 13px; border-top: 1px solid var(--border);
}
footer a { color: var(--primary); }
h1 { font-size: 26px; line-height: 1.25; margin: 8px 0 12px; }
h2.sect {
  font-size: 20px; margin: 36px 0 12px; padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
}
h3 { font-size: 17px; margin: 24px 0 8px; }
h4 { font-size: 14px; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
code, .mono, pre { font-family: var(--font-mono); font-size: 14px; }
.kind {
  display: inline-block; background: var(--primary); color: #fff; border-radius: 5px;
  padding: 1px 8px; font-size: 12px; vertical-align: middle; margin-right: 6px;
  text-transform: uppercase; letter-spacing: .05em;
}
.sws a { color: var(--muted); font-size: 13px; text-decoration: none; }
.sws a:hover { color: var(--primary); text-decoration: underline; }
.sws-pdf-link {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #59636e);
  background: var(--surface2, #f6f8fa);
  border: 1px solid var(--border, #d0d7de);
  border-radius: 4px;
  padding: 1px 6px;
  text-decoration: none;
  vertical-align: middle;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all .15s ease;
}
.sws-pdf-link:hover {
  color: var(--primary, #006d73);
  border-color: var(--primary, #006d73);
  background: color-mix(in srgb, var(--primary, #006d73) 8%, var(--surface, #fff));
  text-decoration: none;
}
.ups { color: var(--faint); font-size: 12px; font-weight: 400; }
.meta { color: var(--muted); }
pre.syntax {
  background: var(--bg-subtle, #f3f4f6); color: var(--color-ink, #172126);
  border: 1px solid var(--border-default, #c9cdca);
  padding: 12px 14px; border-radius: 8px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}
pre.syntax a { color: var(--primary, #006d73); font-weight: 600; text-decoration: none; }
pre.syntax a:hover { text-decoration: underline; }
article.rec {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; margin: 14px 0;
}
article.rec .recname { margin: 0 0 8px; }
table.props, table.params { border-collapse: collapse; margin: 10px 0; width: 100%; font-size: 14px; }
table.props th {
  text-align: left; color: var(--muted); font-weight: 600; padding: 4px 14px 4px 0;
  white-space: nowrap; vertical-align: top; width: 1%;
}
table.props td { padding: 4px 0; word-break: break-word; }
table.params th {
  text-align: left; background: var(--surface2); border: 1px solid var(--border);
  padding: 5px 10px; font-size: 13px; color: var(--muted);
}
table.params td { border: 1px solid var(--border); padding: 5px 10px; vertical-align: top; overflow-wrap: anywhere; }
table.params td.note { color: var(--muted); font-style: normal; }

/* Mobile: keep generated API tables and diagrams inside the viewport. */
@media (max-width: 600px) {
  header, nav.crumbs { padding-inline: 16px; }
  main { padding: 16px; }
  footer { margin-top: 24px; padding-inline: 16px; }

  table.props, table.params { table-layout: fixed; }
  table.props th, table.props td, table.params th, table.params td {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  table.props th { width: auto; white-space: normal; }
  table.params th, table.params td { padding: 5px 7px; }

  h1 { overflow-wrap: anywhere; word-break: break-word; }
  .diagram { overflow-x: auto; text-align: left; }
  .diagram > svg { display: block; max-width: none !important; min-width: 0; }
  .diagram > svg[viewBox] { width: 100%; height: auto; }
}
.desc p { margin: 8px 0; }
.notes { margin: 10px 0; padding: 8px 12px; background: var(--surface2); border-left: 3px solid var(--border); font-size: 14px; }
.dim { color: var(--muted); font-size: 13px; }
ul.mlist { list-style: none; padding-left: 0; }
ul.mlist li { padding: 3px 0; border-bottom: 1px dotted var(--border); }
ul.mlist.boxes li { border-bottom: none; padding: 4px 0; }
ul.mlist li code.sig {
  display: block; font-size: 13px; line-height: 1.5;
  padding-left: 1.8em; text-indent: -1.8em;
  white-space: normal; word-break: break-word;
}
ul.mlist li code.sig a { color: #4F7FA3; text-decoration: none; }
ul.mlist li code.sig a:hover { text-decoration: underline; }
ul.mlist li code.sig a.fn { color: var(--primary); font-weight: 700; }
ul.mlist li code.sig + .dim { display: block; padding-left: 1.8em; margin-top: 1px; }
.chip {
  display: inline-block; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 2px 10px; font-size: 13px; margin: 2px 4px 2px 0; color: var(--muted);
}
/* Karten (Index) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; text-decoration: none; color: var(--text);
}
.card:hover { border-color: var(--primary); }
.card h3 { margin: 0 0 4px; color: var(--primary); font-family: monospace; font-size: 17px; }
.card p { margin: 4px 0; font-size: 14px; }
.depsvg { width: 100%; max-width: 860px; height: auto; display: block; margin: 12px auto; }
/* Diagramme */
.diagram { text-align: center; margin: 16px 0; }
.dlevel { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 2px 0; }
.darrow { color: var(--muted); font-size: 13px; line-height: 1.2; }
.dbox {
  display: inline-block; background: var(--surface2); border: 1.5px solid var(--primary);
  color: var(--primary); border-radius: 7px; padding: 4px 12px; text-decoration: none;
  font-family: monospace; font-size: 14px; max-width: 340px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.dbox:hover { background: var(--primary); color: #fff; }
.dbox.self { background: var(--primary); color: #fff; font-weight: 700; }
.dbox.ext { border-color: var(--faint); color: var(--muted); }
ul.tree, ul.tree ul { list-style: none; padding-left: 26px; margin: 4px 0; }
ul.tree { padding-left: 0; }
ul.tree li { position: relative; padding: 3px 0; }
ul.tree ul li::before {
  content: ""; position: absolute; left: -14px; top: 0; bottom: 50%;
  border-left: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border);
  width: 12px; border-bottom-left-radius: 6px;
}
@media (prefers-reduced-motion: no-preference) { .dbox { transition: background .15s, color .15s; } }

/* Dark mode support for Graphviz & SVG diagrams */
[data-theme="dark"] .diagram svg path[stroke="#28251d"],
[data-theme="dark"] .diagram svg path[stroke="black"],
[data-theme="dark"] .diagram svg polygon[stroke="#28251d"],
[data-theme="dark"] .diagram svg polygon[stroke="black"],
[data-theme="dark"] .diagram svg ellipse[stroke="#28251d"],
[data-theme="dark"] .diagram svg ellipse[stroke="black"],
[data-theme="dark"] .depsvg path[stroke="#28251d"],
[data-theme="dark"] .depsvg path[stroke="black"],
[data-theme="dark"] .depsvg polygon[stroke="#28251d"],
[data-theme="dark"] .depsvg polygon[stroke="black"],
[data-theme="dark"] .depsvg ellipse[stroke="#28251d"],
[data-theme="dark"] .depsvg ellipse[stroke="black"] {
  stroke: var(--color-ink, #e8eeef) !important;
}

[data-theme="dark"] .diagram svg polygon[fill="#28251d"],
[data-theme="dark"] .diagram svg polygon[fill="black"],
[data-theme="dark"] .diagram svg ellipse[fill="#28251d"],
[data-theme="dark"] .diagram svg ellipse[fill="black"],
[data-theme="dark"] .depsvg polygon[fill="#28251d"],
[data-theme="dark"] .depsvg polygon[fill="black"],
[data-theme="dark"] .depsvg ellipse[fill="#28251d"],
[data-theme="dark"] .depsvg ellipse[fill="black"] {
  fill: var(--color-ink, #e8eeef) !important;
}

[data-theme="dark"] .diagram svg text[fill="#28251d"],
[data-theme="dark"] .diagram svg text[fill="black"],
[data-theme="dark"] .depsvg text[fill="#28251d"],
[data-theme="dark"] .depsvg text[fill="black"] {
  fill: var(--color-ink, #e8eeef) !important;
}

[data-theme="dark"] .diagram svg .node path[fill="#ffffff"],
[data-theme="dark"] .depsvg .node path[fill="#ffffff"] {
  fill: var(--bg-surface, #1c2328) !important;
}

/* Interne Verweise in KI-Diagrammen (_src/lib_diaglinks.py): Beschriftungen, die ein
   bekanntes Element nennen; Anforderungs-IDs stehen im Tooltip (<title>) und in der
   Quellenzeile der Bildunterschrift. */
.diagram svg a.diag-ref { cursor: pointer; fill: var(--primary); text-decoration: underline; }
.diagram svg a.diag-ref:hover, .diagram svg a.diag-ref:focus-visible {
  fill: var(--primary-hover); text-decoration-thickness: 2px;
}

/* --- KI-generierte Abschnitte --- */
.ai-badge {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  background: #7A39BB; color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  padding: 2px 10px; text-transform: uppercase;
}
.ai {
  background: color-mix(in srgb, #7A39BB 5%, var(--surface));
  border: 1px solid color-mix(in srgb, #7A39BB 30%, var(--border));
  border-left: 4px solid #7A39BB; border-radius: 8px;
  padding: 6px 16px 10px; margin: 10px 0 18px;
}
.ai h3 { font-size: 15px; margin: 14px 0 4px; color: var(--text); }
.ai h4 { font-size: 14px; margin: 12px 0 4px; color: var(--text); }
.ai-note { font-size: 12.5px; color: var(--muted); font-style: normal;
  border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.module-guide { max-width: 100%; }
.module-guide > h4 { margin-top: 18px; }
.module-guide > ul { margin: 6px 0 12px; padding-left: 22px; }
.module-guide > ul li { margin: 5px 0; }
.module-guide, .module-guide p, .module-guide li,
article.rec .ai.usage, article.rec .ai.usage p, article.rec .ai.usage li {
  overflow-wrap: anywhere;
  word-break: normal;
}
.module-guide code, article.rec .ai.usage code {
  white-space: normal;
  overflow-wrap: anywhere;
}
article.rec .ai.usage {
  margin: 12px 0 14px; padding: 5px 12px 8px;
}
article.rec .ai.usage h4 { margin: 7px 0 3px; font-size: 13px; }
article.rec .ai.usage .ai-badge { margin-left: 6px; font-size: 10px; }
article.rec .ai.usage .ai-note {
  margin: 0 0 7px; padding-bottom: 5px; font-size: 12px;
}
article.rec .ai.usage p { margin: 6px 0; font-size: 14px; }
/* KI-Hinweis und gewähltes Release (fold.js updateAnchorStatus, lib_docmodel._anchor_status_html) */
.ai-anchor-status {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin: 8px 0 6px; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; line-height: 1.4;
  color: var(--text); background: color-mix(in srgb, var(--primary) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-left-width: 4px;
}
.ai-anchor-status[hidden] { display: none; }
.ai-anchor-status.is-differs {
  background: color-mix(in srgb, var(--status-candidate, #b7791f) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--status-candidate, #b7791f) 55%, var(--border));
}
.ai-anchor-status.is-uncaptured { border-style: dashed; border-left-style: solid; }
.ai-anchor-text { min-width: 0; overflow-wrap: anywhere; }
.ai-anchor-go, .ai-anchor-pick {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--primary);
  background: transparent; border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  border-radius: 999px; padding: 1px 9px; min-height: 24px;
}
.ai-anchor-go:hover, .ai-anchor-pick:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.ai-anchor-go:focus-visible, .ai-anchor-pick:focus-visible { outline: 2px solid var(--color-focus, #7c3aed); outline-offset: 1px; }
.ai-anchor-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; font-size: 12.5px; color: var(--muted); }
.ai-anchor-pick.cur { color: #fff; background: var(--primary); border-color: var(--primary); }

article.rec .ai.usage ul { margin: 6px 0; padding-left: 20px; }

/* --- CONCEPT-0056: Ungesicherte Evidenz & Verifizierte Badges --- */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.bp-curated {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #047857;
}
.bp-ai {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #b45309;
}
.ai-unverified-evidence {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 10px 0 12px;
}
.ai-unverified-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.btn-curate-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 4px;
  padding: 2px 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-curate-inline:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #78350f;
  text-decoration: none;
}
.ai-unverified-body {
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
  color: var(--text);
}

/* --- Multi-Release Provenienz & Kausale Anker (INV-CAUSAL-ANCHOR-01) --- */
.ai-provenance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: color-mix(in srgb, #01696f 8%, var(--surface));
  border: 1px solid color-mix(in srgb, #01696f 35%, var(--border));
  border-left: 4px solid #01696f;
  border-radius: 6px;
  padding: 8px 14px;
  margin: 10px 0 14px;
}
.ai-provenance-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ai-provenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #01696f;
  color: #fff;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.ai-provenance-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.ai-provenance-desc {
  font-size: 12px;
  color: var(--muted);
}
.btn-provenance-audit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #01696f;
  background: color-mix(in srgb, #01696f 12%, transparent);
  border: 1px solid color-mix(in srgb, #01696f 35%, var(--border));
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-provenance-audit:hover {
  background: color-mix(in srgb, #01696f 25%, transparent);
}

.ai-provenance-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, #01696f 12%, var(--surface));
  border: 1px solid color-mix(in srgb, #01696f 40%, var(--border));
  color: #01696f;
  margin-left: 6px;
  vertical-align: middle;
}
.spec-record-ref {
  font-weight: 600;
  color: var(--primary, #01696f);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.spec-record-ref:hover {
  text-decoration: underline;
}
/* Diskussionsverweise der KI-Texte und offene Fragen (Explorer-Reiter „Fragen & Diskussionen“) */
.discussion-ref {
  font-weight: 600;
  color: var(--primary, #01696f);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.discussion-ref:hover { text-decoration: underline; }
.ai-open-questions {
  font-size: 11px;
  line-height: 1.5;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #b45309 45%, var(--border));
  background: color-mix(in srgb, #b45309 10%, var(--surface));
  color: #b45309;
  text-decoration: none;
  white-space: nowrap;
}
.ai-open-questions:hover, .ai-open-questions:focus-visible { text-decoration: underline; }
.interp-q {
  font-size: 11px;
  line-height: 1.5;
  padding: 1px 7px;
  border-radius: 999px;
  margin-inline: 4px;
  display: inline-block;
  vertical-align: baseline;
  text-decoration: none;
  white-space: nowrap;
}
.interp-q:hover, .interp-q:focus-visible { text-decoration: underline; }
.interp-q-open {
  border: 1px solid color-mix(in srgb, var(--interp-open) 45%, var(--border));
  background: color-mix(in srgb, var(--interp-open) 10%, var(--surface));
  color: var(--interp-open);
}
.interp-q-answered {
  border: 1px solid color-mix(in srgb, var(--interp-answered) 45%, var(--border));
  background: color-mix(in srgb, var(--interp-answered) 10%, var(--surface));
  color: var(--interp-answered);
}
.interp-q-unmatched {
  border: 1px solid color-mix(in srgb, var(--interp-unmatched) 45%, var(--border));
  background: color-mix(in srgb, var(--interp-unmatched) 10%, var(--surface));
  color: var(--interp-unmatched);
}
.interp-q-dismissed, .interp-q-stale {
  border: 1px solid color-mix(in srgb, var(--interp-neutral) 45%, var(--border));
  background: color-mix(in srgb, var(--interp-neutral) 10%, var(--surface));
  color: var(--interp-neutral);
}


/* --- Anforderungen im Volltext --- */
.req {
  border: 1px solid var(--border); border-radius: 8px;
  margin: 8px 0; background: var(--surface);
}
.req > summary {
  cursor: pointer; padding: 8px 12px; font-size: 14px;
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.req > summary:hover { background: var(--surface2); }
.req > summary .ups { font-size: 12px; color: var(--muted); }
.reqbody { padding: 2px 14px 10px; border-top: 1px solid var(--border); }
.reqbody p { margin: 8px 0; font-size: 14px; }
.reqbody .ups, .reqbody .reqsrc { font-size: 12.5px; color: var(--muted); }
.swsref { font-family: monospace; font-size: 0.95em; white-space: nowrap; }
a.swsref.internal-spec-ref,
a.internal-spec-ref.swsref {
  color: var(--primary, #006d73);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--primary, #006d73) 55%, transparent);
  padding: 0 1px;
}
a.swsref.internal-spec-ref::before,
a.internal-spec-ref.swsref::before {
  content: "◆";
  font-size: 0.65em;
  margin-right: 0.2em;
  opacity: 0.75;
  vertical-align: baseline;
}
a.swsref.internal-spec-ref:hover,
a.internal-spec-ref.swsref:hover {
  border-bottom-style: solid;
  text-decoration: none;
}

/* --- Externe Links: Publisher-Favicons (AUTOSAR Consortium, Eclipse Foundation / S-Core) --- */
a[href*="autosar.org"]:not(.internal-spec-ref):not(:has(img))::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='%23002f6c'/%3E%3Cpath d='M3 13L8 3l5 10h-2.2l-1.1-2.4H6.3L5.2 13H3zm3.9-4.2h2.2L8 6.5l-1.1 2.3z' fill='%23ffffff'/%3E%3Cpath d='M8 3l3.5 7h-1.5L8 5.8 5.5 10H4z' fill='%2300a3e0'/%3E%3C/svg%3E");
}

a[href*="eclipse.org"]:not(.internal-spec-ref):not(:has(img))::before,
a[href*="gitlab.eclipse.org"]:not(.internal-spec-ref):not(:has(img))::before,
a[href*="github.com/eclipse"]:not(.internal-spec-ref):not(:has(img))::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='%232c2255'/%3E%3Ccircle cx='8' cy='8' r='5' fill='%23f35b25'/%3E%3Ccircle cx='9.5' cy='7.5' r='4.2' fill='%232c2255'/%3E%3C/svg%3E");
}

/* --- UML-Diagramme --- */
.umlwrap { overflow-x: auto; margin: 10px 0 18px; padding: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.umlwrap svg { display: block; margin: 0 auto; }
.umlwrap svg text { font-family: 'Segoe UI', system-ui, sans-serif; }

/* enrichment: informal-doc references, interpretations, diagram notes */
a.docref { color: var(--accent, #01696f); }
p.interp { border-left: 3px solid #b58900; padding: 2px 0 2px 10px; background: #fdf6e344; }
.ai .interp strong { color: #8a6d00; }
p.diagram-note { font-size: 12.5px; color: var(--muted, #6b6759); text-align: center; margin: 4px 0 14px; }

/* ==========================================================================
   API-Sichtbarkeit (KI-Einordnung): Die Kategorie eines Elements ist an der
   Hintergrundfarbe seines Namens erkennbar — Blau = APPLICATION (von
   Adaptive Applications nutzbar), Rot = PRIVILEGED (nur autorisierte
   Anwendungen), Dunkelgrau = INTERNAL (nur andere Functional Cluster /
   Plattform-Integration). Gemischte Aggregate tragen die Mehrheitsfarbe.
   Zentral änderbar: Farbwerte über die *-rgb-Variablen, Blassheit über
   --vis-bg-alpha (Standard) und --vis-bg-alpha-hover (Mouseover).
   ========================================================================== */
:root {
  --vis-app-rgb: 25, 92, 189;       /* Blau       = APPLICATION */
  --vis-priv-rgb: 198, 40, 40;      /* Rot        = PRIVILEGED  */
  --vis-internal-rgb: 55, 65, 76;   /* Dunkelgrau = INTERNAL    */
  --vis-bg-alpha: 0.09;             /* sehr blass fuer gute Lesbarkeit */
  --vis-bg-alpha-hover: 0.24;       /* bei Mouseover etwas intensiver  */
  --vis-app: rgb(var(--vis-app-rgb));
  --vis-priv: rgb(var(--vis-priv-rgb));
  --vis-internal: rgb(var(--vis-internal-rgb));
  --vis-app-bg: rgba(var(--vis-app-rgb), var(--vis-bg-alpha));
  --vis-priv-bg: rgba(var(--vis-priv-rgb), var(--vis-bg-alpha));
  --vis-internal-bg: rgba(var(--vis-internal-rgb), var(--vis-bg-alpha));
  --vis-app-bg-hover: rgba(var(--vis-app-rgb), var(--vis-bg-alpha-hover));
  --vis-priv-bg-hover: rgba(var(--vis-priv-rgb), var(--vis-bg-alpha-hover));
  --vis-internal-bg-hover: rgba(var(--vis-internal-rgb), var(--vis-bg-alpha-hover));
}
/* Kennzeichnung in der Navigationszeile: Badge mit abgerundetem Rahmen */
nav.crumbs .vis-tag,
.vis-tag {
  float: right; font-weight: 700; font-size: 12px; letter-spacing: .3px;
  max-width: 62%; text-align: right; padding: 1px 10px 2px 10px;
  border: 1.5px solid currentColor; border-radius: 999px;
  margin-left: auto;
  order: 999;
}
/* Namen klassifizierter Elemente im Fliesstext, in Listen und Navigation:
   blasse Hintergrundfarbe als primaeres Erkennungsmerkmal */
a.vis-app, span.vis-app {
  color: var(--vis-app); background: var(--vis-app-bg);
  border-radius: 4px; padding: 0 4px;
}
a.vis-priv, span.vis-priv {
  color: var(--vis-priv); background: var(--vis-priv-bg);
  border-radius: 4px; padding: 0 4px;
}
a.vis-internal, span.vis-internal {
  color: var(--vis-internal); background: var(--vis-internal-bg);
  border-radius: 4px; padding: 0 4px;
}
a.vis-app:hover { background: var(--vis-app-bg-hover); }
a.vis-priv:hover { background: var(--vis-priv-bg-hover); }
a.vis-internal:hover { background: var(--vis-internal-bg-hover); }
a.vis-app code, a.vis-priv code, a.vis-internal code { background: transparent; }
/* Listen-Boxen (Klassen-/Namespace-/Service-Uebersichten) */
a.dbox.vis-app { border-color: var(--vis-app); color: var(--vis-app); background: var(--vis-app-bg); }
a.dbox.vis-priv { border-color: var(--vis-priv); color: var(--vis-priv); background: var(--vis-priv-bg); }
a.dbox.vis-internal { border-color: var(--vis-internal); color: var(--vis-internal); background: var(--vis-internal-bg); }
a.dbox.vis-app:hover { background: var(--vis-app-bg-hover); }
a.dbox.vis-priv:hover { background: var(--vis-priv-bg-hover); }
a.dbox.vis-internal:hover { background: var(--vis-internal-bg-hover); }
/* Modul-Karten auf der Startseite */
a.card.vis-app { border-left: 5px solid var(--vis-app); background: var(--vis-app-bg); }
a.card.vis-priv { border-left: 5px solid var(--vis-priv); background: var(--vis-priv-bg); }
a.card.vis-internal { border-left: 5px solid var(--vis-internal); background: var(--vis-internal-bg); }
a.card.vis-app:hover { background: var(--vis-app-bg-hover); }
a.card.vis-priv:hover { background: var(--vis-priv-bg-hover); }
a.card.vis-internal:hover { background: var(--vis-internal-bg-hover); }
/* Seitenkopf des Elements selbst: Name mit blasser Hintergrundfarbe */
body.vis-app h1, body.vis-priv h1, body.vis-internal h1 {
  border-radius: 6px; padding: 6px 10px;
}
body.vis-app h1 { background: var(--vis-app-bg); border-bottom: 3px solid var(--vis-app); }
body.vis-priv h1 { background: var(--vis-priv-bg); border-bottom: 3px solid var(--vis-priv); }
body.vis-internal h1 { background: var(--vis-internal-bg); border-bottom: 3px solid var(--vis-internal); }
body.vis-app h1:hover { background: var(--vis-app-bg-hover); }
body.vis-priv h1:hover { background: var(--vis-priv-bg-hover); }
body.vis-internal h1:hover { background: var(--vis-internal-bg-hover); }
body.vis-app h1 .kind { background: var(--vis-app); }
body.vis-priv h1 .kind { background: var(--vis-priv); }
body.vis-internal h1 .kind { background: var(--vis-internal); }
/* Diagramme: verlinkte Knoten erhalten die blasse Kategorie-Hintergrundfarbe
   als Fuellung (ueberschreibt die fill-Attribute der SVGs) und die
   Kategorie-Farbe als Rahmen; bei Mouseover wird die Fuellung intensiver.
   Weisser Unterlege-Layer, damit die rgba-Fuellung auf jedem Untergrund
   konsistent blass wirkt. */
svg a.vis-app rect, svg a.vis-app path, svg a.vis-app polygon, svg a.vis-app ellipse, svg a.vis-app circle {
  fill: var(--vis-app-bg); stroke: var(--vis-app);
}
svg a.vis-priv rect, svg a.vis-priv path, svg a.vis-priv polygon, svg a.vis-priv ellipse, svg a.vis-priv circle {
  fill: var(--vis-priv-bg); stroke: var(--vis-priv);
}
svg a.vis-internal rect, svg a.vis-internal path, svg a.vis-internal polygon, svg a.vis-internal ellipse, svg a.vis-internal circle {
  fill: var(--vis-internal-bg); stroke: var(--vis-internal);
}
svg a.vis-app:hover rect, svg a.vis-app:hover path, svg a.vis-app:hover polygon, svg a.vis-app:hover ellipse, svg a.vis-app:hover circle { fill: var(--vis-app-bg-hover); }
svg a.vis-priv:hover rect, svg a.vis-priv:hover path, svg a.vis-priv:hover polygon, svg a.vis-priv:hover ellipse, svg a.vis-priv:hover circle { fill: var(--vis-priv-bg-hover); }
svg a.vis-internal:hover rect, svg a.vis-internal:hover path, svg a.vis-internal:hover polygon, svg a.vis-internal:hover ellipse, svg a.vis-internal:hover circle { fill: var(--vis-internal-bg-hover); }
/* Diagramm-Beschriftungen in der Kategorie-Farbe, Hintergruende nicht auf <text> */
svg a.vis-app, svg a.vis-priv, svg a.vis-internal { background: none; padding: 0; }
svg a.vis-app text { fill: var(--vis-app); }
svg a.vis-priv text { fill: var(--vis-priv); }
svg a.vis-internal text { fill: var(--vis-internal); }
/* Legende auf der Startseite */
.vis-chip {
  display: inline-block; font-weight: 700; font-size: 12px; letter-spacing: .3px;
  border: 1.5px solid currentColor; border-radius: 6px; padding: 1px 8px; margin-right: 8px;
}
ul.vis-legend { list-style: none; padding-left: 0; }
ul.vis-legend > li { margin: 8px 0; }
/* Klassendiagramm-Knoten des Seiten-Elements selbst (nicht verlinkt):
   blasse Kategorie-Hintergrundfarbe wie bei verlinkten Knoten */
svg g.node.vis-app polygon, svg g.node.vis-app path, svg g.node.vis-app rect, svg g.node.vis-app ellipse {
  fill: var(--vis-app-bg); stroke: var(--vis-app);
}
svg g.node.vis-priv polygon, svg g.node.vis-priv path, svg g.node.vis-priv rect, svg g.node.vis-priv ellipse {
  fill: var(--vis-priv-bg); stroke: var(--vis-priv);
}
svg g.node.vis-internal polygon, svg g.node.vis-internal path, svg g.node.vis-internal rect, svg g.node.vis-internal ellipse {
  fill: var(--vis-internal-bg); stroke: var(--vis-internal);
}
svg g.node.vis-app:hover polygon, svg g.node.vis-app:hover path, svg g.node.vis-app:hover rect { fill: var(--vis-app-bg-hover); }
svg g.node.vis-priv:hover polygon, svg g.node.vis-priv:hover path, svg g.node.vis-priv:hover rect { fill: var(--vis-priv-bg-hover); }
svg g.node.vis-internal:hover polygon, svg g.node.vis-internal:hover path, svg g.node.vis-internal:hover rect { fill: var(--vis-internal-bg-hover); }
/* Interface-Typ-Badges auf den Modulkarten der Startseite */
p.card-badges { margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.card .mini-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  border: 1.5px solid currentColor; border-radius: 999px; padding: 0 8px;
  white-space: nowrap;
}
/* Gemischte Module: reduzierte Chrominanz gegenueber "reinrassigen" Modulen.
   Die Mehrheitsfarbe wird mit Neutralgrau gemischt (45 % Farbanteil); die
   Blassheit (9 % / 24 % bei Mouseover) entspricht --vis-bg-alpha(-hover). */
a.card.vis-mixed.vis-app { --vis-card-c: color-mix(in srgb, var(--vis-app) 45%, #8a8a8a); }
a.card.vis-mixed.vis-priv { --vis-card-c: color-mix(in srgb, var(--vis-priv) 45%, #8a8a8a); }
a.card.vis-mixed.vis-internal { --vis-card-c: color-mix(in srgb, var(--vis-internal) 45%, #8a8a8a); }
a.card.vis-mixed { border-left: 5px solid var(--vis-card-c); background: color-mix(in srgb, var(--vis-card-c) 9%, transparent); }
a.card.vis-mixed:hover { background: color-mix(in srgb, var(--vis-card-c) 24%, transparent); }

/* Literaturverweise in Zitaten + Fußnoten */
a.bibref { color: #0b5aa0; text-decoration: none; border-bottom: 1px dotted #0b5aa0; }
a.bibref:hover { background: #eaf3fb; }
p.fnote { font-size: .82em; color: #5b6772; border-top: 1px dashed #c8cfd6; margin-top: .6em; padding-top: .4em; line-height: 1.5; }
p.fnote a { color: #0b5aa0; }

/* ---- Klappbare KI-Guide-Abschnitte (details.fold, siehe fold.js) ---- */
details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary > h2.sect::before {
  content: "\25B8";
  display: inline-block; width: .85em; margin-right: .25em;
  color: var(--primary); transition: transform .15s ease;
}
details.fold[open] > summary > h2.sect::before { transform: rotate(90deg); }
details.fold > summary:hover > h2.sect { color: var(--primary); }
details.fold > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------------------------------------------------- Sprachumschalter */
header .langs {
  margin-inline-start: auto; align-self: center;
  display: flex; gap: 4px; align-items: center; flex-wrap: nowrap;
}
header .langs a { display: inline-flex; line-height: 0; opacity: .55; border-radius: 2px; }
header .langs a:hover, header .langs a:focus-visible { opacity: 1; }
header .langs a.cur { opacity: 1; outline: 2px solid #BCE2E7; outline-offset: 1px; }
header .langs img { width: 21px; height: 14px; object-fit: cover; border-radius: 2px; display: block; }
@media print { header .langs { display: none; } }

/* ------------------------------------------------- RTL (z. B. Arabisch) */
[dir="rtl"] pre, [dir="rtl"] code, [dir="rtl"] pre.syntax,
[dir="rtl"] .umlwrap, [dir="rtl"] svg text {
  direction: ltr; unicode-bidi: isolate;
}
[dir="rtl"] nav.crumbs { direction: ltr; text-align: right; unicode-bidi: isolate; }
[dir="rtl"] header { flex-direction: row-reverse; }
[dir="rtl"] header .titleblock { text-align: left; }
[dir="rtl"] header .langs {
  margin-inline-start: auto;
  margin-inline-end: 0;
  direction: ltr;
}

/* Interaktiver, aus der Spezifikationsdatenbank abgeleiteter Komponentengraph */
.component-graph{margin:1.5rem 0 2rem}.component-graph-tools{display:flex;flex-wrap:wrap;gap:.65rem;align-items:center;margin-bottom:.75rem}
.component-graph-caption{margin:.35rem 0 .5rem;font-size:.875rem;line-height:1.35}
.component-graph-stage{height:min(78vh,820px);min-height:560px;border:1px solid var(--border,#d4d1ca);border-radius:.6rem;background:
  radial-gradient(ellipse at center, #fbfbf9 0%, #f3f0ec 55%, #ebe8e2 100%);overflow:hidden;position:relative}
.component-graph-tools input[type="search"],.component-graph-tools select,.component-graph-tools button{min-height:2.35rem;padding:.4rem .65rem;border:1px solid var(--border,#d4d1ca);border-radius:.4rem;background:var(--surface,#f9f8f5);color:inherit}.component-graph-tools button{cursor:pointer}.graph-weight{display:flex;align-items:center;gap:.4rem;font-size:.9rem;color:var(--muted,#7a7974)}.graph-weight output{min-width:2ch;font-variant-numeric:tabular-nums}.graph-anchor-force,.graph-text-size{display:flex;align-items:center;gap:.45rem;padding:.35rem .55rem;border:1px solid var(--border,#d4d1ca);border-radius:.4rem;background:var(--surface,#f9f8f5);font-size:.85rem;color:var(--muted,#7a7974);white-space:nowrap}.graph-anchor-force{margin-inline-start:auto}.graph-anchor-force input,.graph-text-size input{width:9rem;accent-color:var(--primary,#27737b)}.graph-anchor-force output,.graph-text-size output{min-width:3.2rem;text-align:end;font-variant-numeric:tabular-nums;color:var(--text,#28251d)}.component-graph-stage{height:min(78vh,820px);min-height:560px;border:1px solid var(--border,#d4d1ca);border-radius:.6rem;background:var(--surface,#fbfbf9);overflow:hidden;position:relative}.component-graph-stage .dim,.graph-error{padding:1rem}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}@media(max-width:640px){.component-graph-tools>*{width:100%}.component-graph-stage{min-height:70vh}}@media print{.component-graph-tools{display:none}.component-graph-stage{height:650px}}

.component-graph-stage{cursor:grab}
.component-graph-stage:active{cursor:grabbing}


.component-graph-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin:1.5rem 0 .75rem}.component-graph-toolbar .component-graph-caption{margin:0;flex:1}.component-graph-reset-button{min-height:2.35rem;padding:.5rem .8rem;border:1px solid var(--border,#d4d1ca);border-radius:.45rem;background:var(--surface,#f9f8f5);color:inherit;cursor:pointer}.component-graph-reset-button[hidden]{display:none}.component-graph-split{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1rem;align-items:start}.component-graph-removed-panel{border:1px solid var(--border,#d4d1ca);border-radius:.6rem;background:var(--surface,#fbfbf9);min-height:560px;display:flex;flex-direction:column}.component-graph-removed-panel[hidden]{display:none}.component-graph-removed-title{padding:.9rem 1rem;border-bottom:1px solid var(--border,#d4d1ca);font-weight:600;color:var(--muted,#7a7974)}.component-graph-removed-canvas{padding:.75rem;display:flex;flex-direction:column;gap:.65rem;min-height:0}.component-graph-removed-item{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;width:100%;text-align:left;padding:.7rem .8rem;border:1px solid var(--border,#d4d1ca);border-radius:.55rem;background:var(--surface-2,#fff);cursor:grab;box-shadow:0 1px 2px rgba(0,0,0,.04)}.component-graph-removed-item.dragging{opacity:.5}.component-graph-removed-item.focused{outline:2px solid var(--module-color,#a13544);outline-offset:1px}.component-graph-removed-group-summary.dragging{opacity:.5}.component-graph-removed-item.selected{background:color-mix(in srgb,var(--module-color,#a13544) 16%,#fff);border-color:var(--module-color,#a13544);border-width:2px;box-shadow:0 0 0 2px color-mix(in srgb,var(--module-color,#a13544) 28%,transparent),0 2px 6px rgba(0,0,0,.1);font-weight:600}.component-graph-removed-item.selected .component-graph-removed-name{color:var(--module-color,#a13544)}.component-graph-removed-item.selected .component-graph-removed-meta{color:color-mix(in srgb,var(--module-color,#a13544) 70%,#4a4741)}.component-graph-removed-group.has-selected>.component-graph-removed-group-summary{font-weight:700;color:var(--module-color,#a13544)}.component-graph-removed-add-all.has-selected{border-color:#a13544;color:#a13544;font-weight:600}.component-graph-removed-add-all[hidden]{display:none}.component-graph-collapse-all{display:inline-flex;align-items:center;justify-content:center;width:2.1rem;height:2.1rem;flex:0 0 auto;padding:0;border:1px solid var(--border,#d4d1ca);border-radius:.45rem;background:var(--surface,#f9f8f5);color:inherit;cursor:pointer}.component-graph-collapse-all[hidden]{display:none}.component-graph-collapse-all:hover:not(:disabled){background:var(--surface-2,#fff);border-color:var(--muted,#7a7974)}.component-graph-collapse-all:disabled{opacity:.4;cursor:default}.component-graph-collapse-caret{display:block;width:0;height:0;border-left:.42rem solid transparent;border-right:.42rem solid transparent;border-top:.5rem solid currentColor;transition:transform .15s ease}.component-graph-collapse-all.collapsed .component-graph-collapse-caret{transform:rotate(-90deg)}.component-graph-removed-breakthrough{margin:-.35rem 0 .15rem;padding-left:.9rem;border-left:3px solid var(--module-color,#a13544)}.component-graph-removed-name{font-size:.92rem;line-height:1.3;word-break:break-word}.component-graph-removed-meta{font-size:.78rem;color:var(--muted,#7a7974);text-transform:uppercase;letter-spacing:.04em}.component-graph-stage.drag-receive{outline:2px dashed var(--accent,#01696f);outline-offset:-6px}.component-graph-marquee{position:absolute;pointer-events:none;z-index:20;border-radius:.3rem;border:1.5px solid var(--marquee-hue,#a13544);background:color-mix(in srgb,var(--marquee-hue,#a13544) 14%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--marquee-hue,#a13544) 22%,transparent),0 4px 18px color-mix(in srgb,var(--marquee-hue,#a13544) 22%,transparent);transition:background-color .12s ease,border-color .12s ease}.component-graph-marquee[hidden]{display:none}.component-graph-marquee.active{animation:component-graph-marquee-in .14s ease-out}.component-graph-marquee[data-mode="replace"]{--marquee-hue:#a13544}.component-graph-marquee[data-mode="add"]{--marquee-hue:#01696f;border-style:solid;border-width:2px}.component-graph-marquee[data-mode="toggle"]{--marquee-hue:#8a6a1f;border-style:dashed;border-width:2px}.component-graph-marquee::after{content:"";position:absolute;inset:0;border-radius:inherit;background:repeating-linear-gradient(45deg,color-mix(in srgb,var(--marquee-hue,#a13544) 10%,transparent) 0 6px,transparent 6px 12px);opacity:0;transition:opacity .12s ease}.component-graph-marquee[data-mode="toggle"]::after{opacity:1}@keyframes component-graph-marquee-in{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){.component-graph-marquee{transition:none}.component-graph-marquee.active{animation:none}}@media(max-width:980px){.component-graph-split{grid-template-columns:1fr}.component-graph-removed-panel{min-height:auto}}

/* Parked-class tray: locked to the canvas height; the list scrolls when it overflows. */
.component-graph-removed-panel {
  height: min(78vh, 820px);
  min-height: 560px;
  max-height: min(78vh, 820px);
  resize: none;
  overflow: hidden;
}
/* Titlebar stays pinned while only the item list scrolls. */
.component-graph-removed-titlebar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border, #d4d1ca);
}
.component-graph-removed-titlebar .component-graph-removed-title {
  flex: 1 1 100%;
  padding: 0 0 .15rem;
  border-bottom: 0;
}
.component-graph-removed-titlebar .component-graph-removed-search {
  flex: 1 1 8rem;
  min-width: 0;
}
.component-graph-removed-canvas {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
@media (max-width: 980px) {
  .component-graph-removed-panel {
    height: auto;
    min-height: auto;
    max-height: 60vh;
  }
}


/* Parked classes grouped by module. */
.component-graph-removed-group {
  border: 1px solid color-mix(in srgb, var(--module-color) 38%, var(--border, #d4d1ca));
  border-radius: .55rem;
  background: var(--surface-2, #fff);
  overflow: clip;
}
.component-graph-removed-group-summary {
  padding: .65rem .75rem;
  border-left: .28rem solid var(--module-color);
  color: var(--module-color);
  background: color-mix(in srgb, var(--module-color) 7%, var(--surface-2, #fff));
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.component-graph-removed-group-summary:hover {
  background: color-mix(in srgb, var(--module-color) 12%, var(--surface-2, #fff));
}
.component-graph-removed-group-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .6rem;
  border-top: 1px solid var(--border, #d4d1ca);
}
.component-graph-removed-group .component-graph-removed-item {
  box-shadow: none;
}

/* User feedback ingest — header trigger + dialog fields */
.feedback-open{min-height:34px;margin-left:auto;border:1px solid rgba(255,255,255,.24);border-radius:6px;background:rgba(255,255,255,.08);color:#fff;padding:6px 10px;display:inline-flex;align-items:center;gap:7px;font:600 13px/1 inherit;cursor:pointer;white-space:nowrap}.feedback-open:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.4)}.feedback-open:focus-visible{outline:2px solid #fff;outline-offset:2px}.feedback-open.is-floating{position:fixed;z-index:900;right:16px;bottom:16px;margin:0;min-height:44px;background:var(--primary);border-color:var(--primary);box-shadow:0 8px 24px rgba(25,23,19,.18)}.feedback-form{display:grid;gap:12px}.feedback-form .rv-field textarea,.feedback-form .rv-field input,.feedback-form .rv-field select{width:100%;min-height:42px;border:1px solid var(--border);border-radius:6px;background:var(--surface2);color:var(--text);padding:9px 11px;font:400 14px/1.45 inherit}.feedback-form .rv-field textarea{min-height:88px;resize:vertical}.feedback-form .rv-field input:focus,.feedback-form .rv-field textarea:focus,.feedback-form .rv-field select:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 14%,transparent)}.feedback-errors{margin:0;padding:8px 10px;border:1px solid #d8a4aa;border-radius:6px;background:#fbf0f1;color:#842d39;font-size:13px}.feedback-receipt{display:grid;gap:8px}.feedback-receipt code{overflow-wrap:anywhere;font-size:12px}
.reviewbar{display:flex;align-items:center;gap:6px;margin-left:0}.reviewbar button{min-height:34px;border:1px solid rgba(255,255,255,.24);border-radius:6px;background:rgba(255,255,255,.08);color:#fff;padding:6px 10px;display:inline-flex;align-items:center;gap:7px;font:600 13px/1 inherit;cursor:pointer;transition:background .16s,border-color .16s}.reviewbar button:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.4)}.reviewbar button:focus-visible{outline:2px solid #fff;outline-offset:2px}.reviewbar-github.is-connected .reviewbar-status{background:#78c091;box-shadow:0 0 0 2px rgba(120,192,145,.22)}.reviewbar-status{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.38)}.review-count{min-width:20px;height:20px;padding:0 6px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.16);font-variant-numeric:tabular-nums}.reviewbar-package.has-items .review-count{background:#fff;color:var(--primary)}
.reqtext.unreviewed{position:relative;border:1px solid color-mix(in srgb,var(--primary) 26%,var(--border));background:color-mix(in srgb,var(--primary) 4%,var(--surface2));border-radius:6px;padding:14px 16px 14px 20px}.reqtext.unreviewed::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:0 2px 2px 0;background:var(--primary)}
.review-panel{border:1px solid #e0c76b;border-radius:8px;background:#fbf1c7;margin:8px 0 18px;box-shadow:0 1px 2px rgba(40,37,29,.04);overflow:hidden}.review-panel[open]{box-shadow:0 6px 20px rgba(40,37,29,.07)}.review-panel>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:46px;padding:10px 14px;cursor:pointer;color:var(--text);font-weight:650;font-size:14px;user-select:none;transition:background .16s}.review-panel>summary::-webkit-details-marker{display:none}.review-panel>summary:hover{background:color-mix(in srgb,#e0c76b 24%,#fbf1c7)}.review-panel>summary::after{content:"";width:7px;height:7px;margin-left:auto;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg) translateY(-2px);transition:transform .16s}.review-panel[open]>summary::after{transform:rotate(225deg) translate(-2px,-2px)}.review-summary-mark{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:color-mix(in srgb,var(--primary) 11%,var(--surface));color:var(--primary);font:700 13px/1 inherit}.review-panel.is-done .review-summary-mark{font-size:0;background:#e4f1e8;color:#29623b}.review-panel.is-done .review-summary-mark::before{content:"✓";font-size:13px}
.review-fields{border-top:1px solid #e0c76b;padding:16px;display:grid;gap:16px;background:#fdf6e1}.review-decision{border:0;padding:0;margin:0;display:flex;gap:8px}.review-choice{position:relative;display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 14px;border:1.5px solid var(--border);border-radius:6px;font-size:14px;font-weight:600;cursor:pointer;transition:border-color .16s,background .16s,color .16s,box-shadow .16s}.review-choice-icon{font-size:16px;line-height:1;color:currentColor}.review-choice:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.review-choice-accept{color:#14532d;border-color:#86efac;background:#dcfce7}.review-choice-accept:hover{color:#052e16;border-color:#22c55e;background:#bbf7d0}.review-choice-reject{color:#7f1d1d;border-color:#fca5a5;background:#fee2e2}.review-choice-reject:hover{color:#450a0a;border-color:#ef4444;background:#fecaca}[data-theme="dark"] .review-choice-accept{color:#86efac;background:rgba(34,197,94,.15);border-color:rgba(74,222,128,.35)}[data-theme="dark"] .review-choice-accept:hover{background:rgba(34,197,94,.25);border-color:rgba(74,222,128,.6);color:#bbf7d0}[data-theme="dark"] .review-choice-reject{color:#fca5a5;background:rgba(239,68,68,.15);border-color:rgba(248,113,113,.35)}[data-theme="dark"] .review-choice-reject:hover{background:rgba(239,68,68,.25);border-color:rgba(248,113,113,.6);color:#fecaca}.review-request-trigger{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:6px 12px;font:600 13px/1 inherit;border-radius:6px;border:1.5px solid var(--primary,#01696f);background:var(--surface-2,#fff);color:var(--primary,#01696f);cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.05);transition:background .16s,color .16s,border-color .16s,box-shadow .16s}.review-request-trigger:hover{background:var(--primary,#01696f);color:#fff;border-color:var(--primary,#01696f)}.review-request-trigger:focus-visible{outline:2px solid var(--primary,#01696f);outline-offset:2px}[data-theme="dark"] .review-request-trigger{background:var(--bg-surface,#21262d);color:var(--color-teal-600,#38bdf8);border-color:var(--color-teal-600,#38bdf8)}[data-theme="dark"] .review-request-trigger:hover{background:var(--color-teal-600,#38bdf8);color:#0f172a}.review-form{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(280px,1.3fr);gap:12px}.review-field{display:grid;align-content:start;gap:6px;color:var(--muted);font-size:12px;font-weight:650;letter-spacing:.01em}.review-field input,.review-field textarea{width:100%;border:1px solid var(--border);border-radius:6px;background:var(--surface2);color:var(--text);font:400 14px/1.45 inherit;padding:9px 11px;transition:border-color .16s,box-shadow .16s}.review-field input{min-height:40px}.review-field textarea{min-height:88px;resize:vertical}.review-field input:focus,.review-field textarea:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 14%,transparent)}.review-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.review-data{display:none}
.rv-drawer[hidden],.rv-modal[hidden]{display:none}.rv-drawer,.rv-modal{position:fixed;inset:0;z-index:1000}.rv-drawer-scrim,.rv-modal-scrim{position:absolute;inset:0;background:rgba(25,23,19,.42);opacity:0;transition:opacity .2s}.rv-drawer.is-open .rv-drawer-scrim,.rv-modal.is-open .rv-modal-scrim{opacity:1}.rv-drawer-panel{position:absolute;inset:0 0 0 auto;width:min(480px,100%);display:flex;flex-direction:column;background:var(--bg);box-shadow:-16px 0 48px rgba(26,24,20,.16);transform:translateX(100%);transition:transform .22s cubic-bezier(.2,.8,.2,1)}.rv-drawer.is-open .rv-drawer-panel{transform:none}.rv-drawer-head,.rv-modal-head{display:flex;align-items:flex-start;gap:12px;padding:20px 20px 16px;border-bottom:1px solid var(--border)}.rv-drawer-head>div{min-width:0}.rv-drawer-head h2,.rv-modal-head h2{margin:0;font-size:19px;line-height:1.25}.rv-drawer-sub{margin:4px 0 0;color:var(--muted);font-size:13px}.rv-icon-btn{flex:0 0 auto;width:34px;height:34px;margin-left:auto;border:0;border-radius:5px;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer}.rv-icon-btn:hover{background:rgba(40,37,29,.07);color:var(--text)}.rv-icon-btn-sm{width:28px;height:28px}.rv-drawer-body{flex:1;overflow:auto;padding:16px}.rv-drawer-foot,.rv-modal-foot{display:flex;align-items:center;gap:8px;padding:14px 16px;border-top:1px solid var(--border);background:var(--surface)}.rv-spacer{flex:1}.rv-btn{min-height:38px;border:1px solid var(--border);border-radius:6px;background:var(--surface2);color:var(--text);padding:8px 12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font:650 13px/1 inherit;cursor:pointer}.rv-btn:hover:not(:disabled){border-color:var(--muted);background:var(--surface)}.rv-btn-primary{border-color:var(--primary);background:var(--primary);color:#fff}.rv-btn-primary:hover:not(:disabled){background:var(--primary-hover);border-color:var(--primary-hover)}.rv-btn-quiet{border-color:transparent;background:transparent;color:var(--muted)}.rv-btn:disabled{opacity:.42;cursor:not-allowed}.rv-empty{min-height:50vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--faint)}.rv-empty>svg{width:34px;height:34px;margin-bottom:14px}.rv-empty-title{margin:0;color:var(--text);font-weight:650}.rv-empty-hint{max-width:32ch;margin:5px 0 0;color:var(--muted);font-size:13px}.rv-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}.rv-item{padding:13px;border:1px solid var(--border);border-radius:7px;background:var(--surface2)}.rv-item-head{display:flex;align-items:center;gap:8px}.rv-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:700}.rv-chip.is-accept{background:#e4f1e8;color:#29623b}.rv-chip.is-reject{background:#f8e8ea;color:#842d39}.rv-item-id{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--primary);font:600 12px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace}.rv-item-why{margin:10px 0 0;color:var(--text);font-size:14px}.rv-item-meta{margin:7px 0 0;color:var(--muted);font-size:12px}
.rv-modal{display:grid;place-items:center;padding:20px}.rv-modal-card{position:relative;width:min(540px,100%);max-height:calc(100vh - 40px);overflow:auto;background:var(--bg);border:1px solid var(--border);border-radius:10px;box-shadow:0 24px 80px rgba(25,23,19,.24);opacity:0;transform:translateY(10px) scale(.985);transition:opacity .18s,transform .18s}.rv-modal.is-open .rv-modal-card{opacity:1;transform:none}.rv-modal-head{align-items:center}.rv-gh-mark{width:34px;height:34px;display:grid;place-items:center;border-radius:7px;background:var(--text);color:var(--bg)}.rv-gh-mark svg{width:20px;height:20px}.rv-modal-body{padding:18px 20px}.rv-modal-lead{margin:0 0 14px;color:var(--text);font-size:14px}.rv-modal-note{margin:12px 0;color:var(--muted);font-size:13px}.rv-modal-note a{display:inline-flex;align-items:center;gap:4px;color:var(--primary);font-weight:600}.rv-modal-note-quiet{margin-bottom:0}.rv-status{min-height:44px;margin:0 0 14px;padding:8px 10px;border:1px solid var(--border);border-radius:6px;background:var(--surface);display:flex;align-items:center;gap:9px;color:var(--muted);font-size:13px}.rv-status.is-ok{border-color:#99bda3;background:#edf6ef;color:#245b35}.rv-status.is-error{border-color:#d8a4aa;background:#fbf0f1;color:#842d39}.rv-status.is-busy{color:var(--primary)}.rv-status div{display:grid}.rv-status strong{font-size:13px}.rv-status span{font-size:11px;opacity:.8}.rv-avatar{border-radius:50%}.rv-facts{display:grid;grid-template-columns:auto 1fr;gap:8px 12px;margin:0;padding:10px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);font-size:12px}.rv-facts dt{color:var(--muted)}.rv-facts dd{margin:0}.rv-facts code{font-size:12px}.rv-field{display:grid;gap:6px;margin-top:14px;color:var(--muted);font-size:12px;font-weight:650}.rv-input{min-height:42px;border:1px solid var(--border);border-radius:6px;background:var(--surface2);color:var(--text);padding:9px 11px;font:400 14px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace}.rv-input:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 14%,transparent)}.rv-check{display:flex;align-items:center;gap:8px;margin-top:9px;color:var(--muted);font-size:12px}.rv-check input{accent-color:var(--primary)}
.rv-toasts{position:fixed;right:18px;bottom:18px;z-index:1100;display:grid;gap:8px;pointer-events:none}.rv-toast{max-width:380px;padding:11px 13px;border:1px solid var(--border);border-radius:7px;background:var(--surface2);color:var(--text);box-shadow:0 10px 30px rgba(25,23,19,.14);display:flex;align-items:center;gap:8px;font-size:13px;opacity:0;transform:translateY(8px);transition:opacity .22s,transform .22s}.rv-toast.is-in{opacity:1;transform:none}.rv-toast>svg{color:#29623b}.rv-toast.is-error>svg{color:#842d39}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:900px){.reviewbar{width:100%;margin:6px 0 0}.reviewbar-github span:not(.reviewbar-status){display:none}.reviewbar button{min-height:38px}.review-form{grid-template-columns:1fr}.rv-drawer-foot{flex-wrap:wrap}.rv-drawer-foot .rv-btn-primary{flex:1}.review-fields{padding:13px}.review-choice{flex:1;justify-content:center}}
@media(max-width:520px){.reviewbar-package>span:not(.review-count){display:none}.rv-modal{padding:8px}.rv-modal-card{max-height:calc(100vh - 16px)}.rv-drawer-foot .rv-btn-quiet{display:none}.rv-drawer-foot .rv-spacer{display:none}.rv-drawer-foot .rv-btn{flex:1}.review-decision{display:grid;grid-template-columns:1fr 1fr}.rv-toasts{left:10px;right:10px;bottom:10px}.rv-toast{max-width:none}}
@media(prefers-reduced-motion:reduce){.rv-drawer-panel,.rv-modal-card,.rv-drawer-scrim,.rv-modal-scrim,.rv-toast{transition:none}}
/* Review discovery and evidence */
.page-review-notice{display:flex;gap:13px;align-items:flex-start;margin:0 0 20px;padding:14px 16px;border:1px solid color-mix(in srgb,var(--primary) 30%,var(--border));border-radius:8px;background:color-mix(in srgb,var(--primary) 6%,var(--surface2));color:var(--text)}.page-review-icon{flex:0 0 auto;width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:var(--primary);color:#fff;font-weight:800}.page-review-notice strong{font-size:14px}.page-review-notice p{margin:3px 0 8px;color:var(--muted);font-size:13px}.page-review-links{display:flex;flex-wrap:wrap;gap:6px}.page-review-links a,.review-needed-badge{display:inline-flex;align-items:center;gap:5px;border:1px solid color-mix(in srgb,var(--primary) 28%,var(--border));border-radius:999px;background:var(--surface2);color:var(--primary);padding:3px 8px;text-decoration:none;font:650 11px/1.4 inherit}.page-review-links a:hover,.review-needed-badge:hover{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 7%,var(--surface2))}ul.mlist li code.sig a.review-needed-badge,a.review-needed-badge{display:inline-block;margin-inline-start:6px;vertical-align:middle;white-space:nowrap;border:1px solid #e0c76b;background:#fdf6e1;color:#7a5c12;border-radius:999px;padding:2px 9px 2px 4px;text-decoration:none;font-family:inherit;font-size:11px;font-weight:650;line-height:15px}ul.mlist li code.sig a.review-needed-badge:hover,a.review-needed-badge:hover{border-color:#c9a227;background:#fbf1c7;color:#5c4409}ul.mlist li code.sig a.review-needed-badge::before,a.review-needed-badge::before{content:"!";display:inline-block;width:15px;height:15px;line-height:15px;text-align:center;vertical-align:top;border-radius:50%;background:#c9a227;color:#fff;font-family:inherit;font-size:10px;font-weight:800;margin-inline-end:5px}ul.mlist li code.sig a.review-needed-badge>span,a.review-needed-badge>span{display:none}[hidden]{display:none!important}
.review-panel>summary>span:nth-child(2){display:grid;gap:2px}.review-panel>summary small{color:var(--muted);font-size:11px;font-weight:500}.review-panel-body{border-top:1px solid var(--border)}.review-panel-body>.review-fields{border-top:1px solid var(--border)}.review-target,.review-context{padding:16px}.review-target{background:color-mix(in srgb,var(--primary) 3%,var(--surface2))}.review-target h3,.review-context h3{margin:0 0 7px;font-size:14px}.review-target>p{margin:0;color:var(--muted);font-size:13px}.review-target blockquote{margin:13px 0 0;padding:12px 14px;border:1px solid var(--border);border-radius:6px;background:var(--surface2);color:var(--text);font:500 14px/1.55 inherit}.review-original{margin-top:10px;font-size:12px}.review-original summary{color:var(--primary);cursor:pointer}.review-original pre{white-space:pre-wrap;margin:8px 0 0;padding:10px;border-radius:5px;background:var(--bg);font-size:12px}.review-context{border-top:1px solid var(--border);background:var(--surface)}.review-meta{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--border);border:1px solid var(--border);border-radius:6px;overflow:hidden}.review-meta-row{min-width:0;padding:9px 11px;background:var(--surface2)}.review-meta-row dt{color:var(--muted);font-size:11px;font-weight:650}.review-meta-row dd{margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text);font-size:12px}.review-meta-emphasis{grid-column:1/-1}.review-meta-emphasis dd{color:var(--primary);font-weight:650}.review-meta-hash dd{font:11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--muted)}
.rv-auth-icon{display:inline-grid;place-items:center;color:currentColor}.rv-auth-icon svg{width:17px;height:17px}.rv-btn[data-auth="fallback"]{position:relative}.rv-btn[data-auth="fallback"] .rv-auth-icon{color:#8a4b00}.rv-btn[data-auth="authenticated"] .rv-auth-icon{color:currentColor}.rv-auth-legend{display:flex;align-items:center;gap:7px;margin:9px 0 0;color:var(--muted);font-size:12px}.rv-auth-legend .rv-auth-icon{color:var(--primary)}
@media(max-width:650px){.review-meta{grid-template-columns:1fr}.review-meta-emphasis{grid-column:auto}.page-review-notice{margin-inline:0}.page-review-links{max-height:86px;overflow:auto}}
/* Reviewer identity */
.review-identity{display:inline-flex;align-items:center;gap:7px;margin:0;margin-inline-end:auto;color:var(--muted);font-size:12px}.review-identity[hidden]{display:none}.review-identity .rv-auth-icon svg{width:15px;height:15px}.review-identity-change{border:0;background:none;padding:0;color:var(--primary);font:inherit;font-size:12px;text-decoration:underline;cursor:pointer}.review-identity-change:hover{color:var(--primary-hover)}.review-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.review-panel.is-done{display:none}.review-choice:disabled{opacity:.55;cursor:wait}
[data-component-graph]:fullscreen{background:var(--surface,#fbfbf9);padding:1rem;display:flex;flex-direction:column;height:100vh;box-sizing:border-box}[data-component-graph]:fullscreen .component-graph-split{flex:1 1 auto;min-height:0}[data-component-graph]:fullscreen .component-graph-stage{height:100%;min-height:0}.component-graph-fullscreen-button{min-height:2.35rem;min-width:2.35rem;padding:.4rem .6rem;border:1px solid var(--border,#d4d1ca);border-radius:.4rem;background:var(--surface,#f9f8f5);color:inherit;cursor:pointer;font-size:1.1rem;line-height:1}.component-graph-fullscreen-button:hover{background:var(--surface-2,#fff);border-color:var(--muted,#7a7974)}

/* 0006-11: Record Status & Curation History styling */
.rec-history-panel {
  margin-top: 1.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface, #f8f9fa);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  font-size: 0.875rem;
}
.rec-history-panel summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  user-select: none;
}
.rec-status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.rec-status-valid {
  background-color: #def7ec;
  color: #03543f;
  border: 1px solid #bcf0da;
}
.rec-status-invalid {
  background-color: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #fbd5d5;
}
.rec-status-proposed {
  background-color: #fef08a;
  color: #713f12;
  border: 1px solid #fde047;
}
.rec-status-neutral {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.rec-history-body {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
}
.rec-status-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.75rem;
}
.rec-status-details dt {
  font-weight: 600;
  color: var(--text-muted, #4b5563);
}
.rec-status-details dd {
  margin: 0;
}
.rec-history-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.8125rem;
}
.rec-history-table th, .rec-history-table td {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border-color, #e5e7eb);
  text-align: left;
}
.rec-history-table th {
  background: var(--bg-header, #f1f5f9);
  font-weight: 600;
}
.rec-actor {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
  font-size: 0.75rem;
}
.rec-curation-link {
  margin-top: 0.5rem;
  font-weight: 500;
}

/* 0006-16 & 0006-23: Version History & Point-in-Time navigation styling */
.rec-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-surface-2, #eef2f6);
  border: 1px solid var(--border-color, #cbd5e1);
  font-size: 0.75rem;
  font-weight: 500;
}
.rec-version-badge code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
}
.rec-version-nav {
  margin: 0.85rem 0;
  padding: 0.75rem;
  background: var(--bg-surface-2, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
}
html[data-theme="dark"] .rec-version-nav {
  background: #1e293b;
  border-color: #334155;
}
.rec-version-nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.rec-version-nav-title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-color, #1e293b);
}
html[data-theme="dark"] .rec-version-nav-title {
  color: #f1f5f9;
}
.rec-version-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rec-asof-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  color: var(--text-muted, #4b5563);
}
.rec-asof-select {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 4px;
  background: var(--bg-surface, #ffffff);
  color: inherit;
  font-size: 0.775rem;
}
html[data-theme="dark"] .rec-asof-select {
  background: #0f172a;
  border-color: #475569;
}
.rec-asof-btn, .rec-asof-close {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--bg-surface, #ffffff);
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}
html[data-theme="dark"] .rec-asof-btn, html[data-theme="dark"] .rec-asof-close {
  background: #0f172a;
  border-color: #475569;
}
.rec-asof-btn:hover, .rec-asof-close:hover {
  background: var(--bg-hover, #e2e8f0);
  border-color: #94a3b8;
}
.rec-version-timeline {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color, #cbd5e1);
}
.rec-version-timeline h5 {
  margin: 0 0 0.35rem 0;
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted, #64748b);
}
.rec-version-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.rec-version-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.775rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
}
html[data-theme="dark"] .rec-version-entry {
  background: #0f172a;
  border-color: #334155;
}
.rec-version-entry.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
}
html[data-theme="dark"] .rec-version-entry.is-active {
  background: #1e3a8a;
  border-color: #60a5fa;
}
.rec-version-entry.rec-version-dropped {
  border: 1px dashed #f87171;
  background: rgba(239, 68, 68, 0.06);
}
html[data-theme="dark"] .rec-version-entry.rec-version-dropped {
  border: 1px dashed #ef4444;
  background: rgba(239, 68, 68, 0.15);
}
.rec-ver-dropped-icon {
  font-size: 0.85rem;
  margin-inline-end: 0.2rem;
}
.rec-ver-dropped-label {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.72rem;
}
html[data-theme="dark"] .rec-ver-dropped-label {
  color: #f87171;
}
.rec-status-badge.rec-status-dropped {
  background: #fef2f2;
  border: 1px solid #f87171;
  color: #b91c1c;
}
html[data-theme="dark"] .rec-status-badge.rec-status-dropped {
  background: #450a0a;
  border-color: #991b1b;
  color: #fca5a5;
}
.rec-asof-dropped-alert {
  padding: 0.65rem 0.9rem;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #991b1b;
  font-size: 0.85rem;
  margin: 0.6rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
html[data-theme="dark"] .rec-asof-dropped-alert {
  background: #450a0a;
  border-color: #991b1b;
  color: #fca5a5;
}
.rec-ver-rel {
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.72rem;
}
html[data-theme="dark"] .rec-ver-rel {
  background: #334155;
  color: #f1f5f9;
}
.rec-ver-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
}
.rec-ver-date {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  margin-inline-start: auto;
}
.rec-active-pill {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.rec-ver-inspect-btn {
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  border-radius: 3px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
}
.rec-asof-display {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #92400e;
}
html[data-theme="dark"] .rec-asof-display {
  background: #2b2313;
  border-color: #78350f;
  color: #fef3c7;
}
.rec-asof-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #fde68a;
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
}
html[data-theme="dark"] .rec-asof-banner {
  border-bottom-color: #78350f;
}
.rec-asof-indicator {
  font-size: 0.8125rem;
}
.rec-asof-heading {
  margin: 0.4rem 0 0.2rem 0;
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rec-asof-text {
  background: rgba(0, 0, 0, 0.04);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
  margin: 0.3rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
html[data-theme="dark"] .rec-asof-text {
  background: rgba(0, 0, 0, 0.3);
}
.rec-asof-decisions, .rec-asof-graph {
  margin: 0.25rem 0 0.5rem 1.25rem;
  padding: 0;
  font-size: 0.775rem;
}

/* ---- 6-domain application shell (F-B) ---- */
.shell-domains {
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: 6px; min-width: 0; flex: 1 1 auto;
}
.shell-domains a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--target-min); min-width: var(--target-min);
  padding: 0 8px; color: #fff; text-decoration: none;
  font-size: var(--font-size-nav); font-weight: 600; border-radius: 4px;
  white-space: nowrap;
}
.shell-domains a:hover { background: rgba(255, 255, 255, .14); }
.shell-domains a:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px;
}
.shell-controls {
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: var(--space-2); margin-inline-start: auto; min-width: 0;
}
header.shell .langs { margin-inline-start: 0; }
.shell-universe {
  display: inline-flex; position: relative;
}
.universe-dropdown {
  position: relative; display: inline-block;
}
.universe-dropdown summary.rel {
  color: #BCE2E7; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  user-select: none; list-style: none;
  white-space: nowrap;
}
.universe-dropdown summary.rel::-webkit-details-marker,
.shell-dropdown summary::-webkit-details-marker {
  display: none;
}
.universe-dropdown summary.rel:hover {
  color: #fff;
}
.dropdown-caret {
  font-size: 9px; opacity: .8;
  display: inline-block; transition: transform .15s ease;
}
details[open] > summary .dropdown-caret {
  transform: rotate(180deg);
}
.universe-dropdown .universes,
.release-dropdown .releases {
  position: absolute; top: calc(100% + 4px); left: 0;
  z-index: 1000; background: var(--bg-surface, #fff);
  border: 1px solid var(--border-default, #d1d5db);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
  min-width: 220px;
}
[data-theme="dark"] .universe-dropdown .universes,
[data-theme="dark"] .release-dropdown .releases {
  background: var(--bg-surface, #1c2328); border-color: rgba(255, 255, 255, .15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.release-dropdown {
  position: relative; display: inline-block;
}
.release-dropdown summary.rel {
  color: inherit; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  user-select: none; list-style: none;
  white-space: nowrap;
}
.release-dropdown summary.rel::-webkit-details-marker {
  display: none;
}
.shell-universe a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; color: var(--color-ink); text-decoration: none;
  font-size: 13px; font-weight: 500; border-radius: 5px;
  border: none; background: transparent; min-height: unset;
}
[data-theme="dark"] .shell-universe a {
  color: var(--color-ink, #e8eeef);
}
.shell-universe a:hover {
  background: var(--bg-subtle, #f3f4f6); color: var(--primary, #0f766e);
}
[data-theme="dark"] .shell-universe a:hover {
  background: rgba(255, 255, 255, .1); color: #fff;
}
.shell-universe a.cur {
  font-weight: 700; color: var(--primary, #0f766e);
  background: var(--bg-subtle, #f3f4f6);
}
[data-theme="dark"] .shell-universe a.cur {
  color: #5eead4; background: rgba(255, 255, 255, .15);
}
.shell-universe a.cur::after {
  content: "✓"; font-weight: bold;
}
.shell-universe a.universe-review {
  margin-top: 4px; border-top: 1px solid var(--border-default, #e5e7eb);
  padding-top: 8px; color: var(--muted, #6b7280); font-size: 12px;
}
[data-theme="dark"] .shell-universe a.universe-review {
  border-top-color: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .7);
}

.shell-dropdown {
  position: relative; display: inline-block;
}
.shell-prefs-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  list-style: none; cursor: pointer; white-space: nowrap;
}
.shell-dropdown-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  z-index: 1000; background: var(--bg-surface, #fff);
  border: 1px solid var(--border-default, #d1d5db);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  padding: 8px 10px; display: flex; flex-direction: column; gap: 8px;
  min-width: 190px;
}
[data-theme="dark"] .shell-dropdown-menu {
  background: var(--bg-surface, #1c2328); border-color: rgba(255, 255, 255, .15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.shell-pref-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.shell-pref-item .pref-label {
  font-size: 12px; font-weight: 600; color: var(--muted, #4b5563);
}
[data-theme="dark"] .shell-pref-item .pref-label {
  color: var(--color-ink, #e8eeef);
}
.shell-pref-item .shell-toggle {
  min-height: 28px; padding: 0 10px; font-size: 12px; border-radius: 4px;
  background: var(--bg-subtle, #f3f4f6); color: var(--color-ink);
  border: 1px solid var(--border-default, #d1d5db);
}
.shell-pref-item .shell-toggle:hover {
  background: var(--color-teal-600, #0f766e); color: #fff;
  border-color: var(--color-teal-600, #0f766e);
}
[data-theme="dark"] .shell-pref-item .shell-toggle {
  background: var(--bg-subtle, #262f35); color: var(--color-ink, #e8eeef);
  border: 1px solid rgba(255, 255, 255, .2);
}
[data-theme="dark"] .shell-pref-item .shell-toggle:hover {
  background: rgba(255, 255, 255, .25); color: #fff;
  border-color: rgba(255, 255, 255, .4);
}

.shell-search {
  display: flex; align-items: center; gap: var(--space-1); min-width: 0;
}
.shell-search input {
  min-height: var(--target-min); min-width: 0; width: 7rem; max-width: 100%;
  padding: 0 var(--space-3); border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 4px; background: rgba(255, 255, 255, .12); color: #fff;
  font: inherit; font-size: var(--font-size-nav);
}
.shell-search input::placeholder { color: rgba(255, 255, 255, .72); }
.shell-search button, .shell-toggle {
  min-height: var(--target-min); min-width: var(--target-min);
  padding: 0 var(--space-3); border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 4px; background: rgba(255, 255, 255, .1); color: #fff;
  font: 600 var(--font-size-nav)/1 var(--font-sans); cursor: pointer;
}
.shell-search button:hover, .shell-toggle:hover { background: rgba(255, 255, 255, .2); }
.shell-search button:focus-visible, .shell-toggle:focus-visible,
.shell-universe a:focus-visible, .shell-search input:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px;
}
[data-theme="dark"] header, [data-theme="dark"] header.shell {
  background: var(--color-teal-600); color: var(--color-ink);
}
.status-approved { color: var(--status-approved); }
.status-candidate { color: var(--status-candidate); }
.status-rejected { color: var(--status-rejected); }
.status-trace { color: var(--status-trace); }

@media (max-width: 1279px) {
  header.shell { gap: var(--space-3); }
  .shell-search input { width: 8rem; }
}
@media (max-width: 767px) {
  header.shell {
    padding: var(--space-2) var(--space-3);
    align-items: stretch;
  }
  header .titleblock { flex: 1 1 100%; }
  .shell-domains, .shell-controls { flex: 1 1 100%; margin-inline-start: 0; }
  .shell-search { flex: 1 1 100%; }
  .shell-search input { width: 100%; flex: 1 1 auto; }
}
@media (max-width: 320px) {
  html, body, header.shell { overflow-x: hidden; }
  header.shell { padding-inline: var(--space-2); gap: var(--space-1); }
  .shell-domains a, .shell-universe a, .shell-toggle, .shell-search button {
    padding-inline: var(--space-2);
  }
}
@media print {
  .skip-link, .shell-domains, .shell-controls { display: none; }
}

/* Traceability graph widget: filters, inspector, universe borders, table fallback */
.component-graph-toolbar {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .55rem .75rem;
}
.component-graph-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  align-items: flex-end;
  flex: 1 1 100%;
}
.component-graph-filters label {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  font-size: .8rem;
  color: var(--muted, #7a7974);
}
.component-graph-filters select {
  min-height: 2.35rem;
  min-width: 9rem;
  padding: .35rem .55rem;
  border: 1px solid var(--border, #d4d1ca);
  border-radius: .4rem;
  background: var(--surface, #f9f8f5);
  color: inherit;
}
.component-inspector {
  border: 1px solid var(--border, #d4d1ca);
  border-radius: .6rem;
  background: var(--surface, #fbfbf9);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 820px);
  overflow: auto;
}
.component-inspector[hidden] { display: none; }
.component-graph-split.is-inspecting {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) 320px;
}
.component-inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border, #d4d1ca);
}
.component-inspector-header h2 {
  margin: 0;
  font-size: 1rem;
}
.component-inspector-close {
  border: 1px solid var(--border, #d4d1ca);
  background: var(--surface, #f9f8f5);
  border-radius: .35rem;
  cursor: pointer;
  min-width: 2rem;
  min-height: 2rem;
}
.component-inspector-body { padding: .85rem 1rem 1.1rem; }
.component-inspector-dl { margin: 0; }
.component-inspector-dl dt {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted, #7a7974);
  margin-top: .65rem;
}
.component-inspector-dl dt:first-child { margin-top: 0; }
.component-inspector-dl dd { margin: .15rem 0 0; word-break: break-word; }
.stereotype-chip {
  display: inline-block;
  margin: 0 .2rem .2rem 0;
  padding: .1rem .4rem;
  border-radius: 999px;
  border: 1px solid var(--border, #d4d1ca);
  background: #eef7f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
}
.component-graph-fallback {
  margin: 1rem 0 0;
  overflow: auto;
}
[data-component-graph][data-graph-mode="canvas"] > .component-graph-fallback { display: none; }
[data-component-graph][data-graph-mode="table"] > .component-graph-split { display: none; }
[data-component-graph][data-graph-mode="table"] > .component-graph-fallback { display: block; }
.component-graph-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: .875rem;
}
.component-graph-table caption {
  text-align: left;
  font-weight: 600;
  margin: 0 0 .45rem;
}
.component-graph-table th,
.component-graph-table td {
  border: 1px solid var(--border, #d4d1ca);
  padding: .4rem .55rem;
  text-align: left;
  vertical-align: top;
}
.component-graph-table th { background: var(--surface, #f3f0ec); }
@media (max-width: 1100px) {
  .component-graph-split.is-inspecting { grid-template-columns: 1fr; }
}
@media print {
  [data-component-graph] > .component-graph-split { display: none; }
  [data-component-graph] > .component-graph-fallback { display: block; }
}

.ai-commentary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #d4d1ca);
}
.btn-discuss-ai, .btn-curate-link, .btn-feedback-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  box-sizing: border-box;
}
.btn-discuss-ai {
  background: var(--accent, #01696f);
  color: #fff;
  border: 1px solid var(--accent, #01696f);
}
.btn-discuss-ai:hover {
  background: #015257;
}
.btn-curate-link, .btn-feedback-action {
  background: var(--surface, #f9f8f5);
  color: var(--text, #28251d);
  border: 1px solid var(--border, #d4d1ca);
}
.btn-curate-link:hover, .btn-feedback-action:hover {
  background: var(--surface-2, #fff);
}

/* AI Model Status Widget */
.ai-model-widget {
  position: relative;
  display: inline-block;
}
.ai-model-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.ai-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #9ca3af;
  flex-shrink: 0;
}
.ai-status-dot.healthy {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}
.ai-status-dot.degraded {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}
.ai-status-dot.error {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}
.ai-model-label {
  font-size: var(--font-size-nav, 13px);
  font-weight: 600;
}
.ai-model-menu {
  min-width: 270px;
  padding: 10px 12px;
}
.ai-model-menu-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--muted, #6b7280);
  margin-bottom: 8px;
}
.ai-model-card {
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--bg-subtle, #f9fafb);
  border: 1px solid var(--border-default, #e5e7eb);
  margin-bottom: 6px;
}
[data-theme="dark"] .ai-model-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.ai-model-card.active-card {
  border-left: 3px solid #10b981;
}
.ai-model-card.secondary-card {
  border-left: 3px solid #6b7280;
}
.ai-model-badge-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.ai-badge-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #d1fae5;
  color: #065f46;
  letter-spacing: 0.03em;
}
[data-theme="dark"] .ai-badge-pill {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.ai-badge-pill.pill-sec {
  background: #e5e7eb;
  color: #374151;
}
[data-theme="dark"] .ai-badge-pill.pill-sec {
  background: rgba(255, 255, 255, 0.12);
  color: #d1d5db;
}
.ai-model-heading {
  font-size: 12px;
  color: var(--color-ink, #111827);
}
[data-theme="dark"] .ai-model-heading {
  color: #f9fafb;
}
.ai-model-details {
  font-size: 11px;
  color: var(--muted, #6b7280);
  line-height: 1.3;
}
[data-theme="dark"] .ai-model-details {
  color: #9ca3af;
}
.ai-model-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-default, #e5e7eb);
}
[data-theme="dark"] .ai-model-menu-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.ai-last-check-text {
  font-size: 10px;
  color: var(--muted, #9ca3af);
}
.ai-recheck-btn {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-default, #d1d5db);
  background: var(--bg-surface, #fff);
  cursor: pointer;
  color: var(--color-ink, #374151);
  font-weight: 500;
}
.ai-recheck-btn:hover {
  background: var(--bg-subtle, #f3f4f6);
}
[data-theme="dark"] .ai-recheck-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
[data-theme="dark"] .ai-recheck-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ========================================================================== */
/* Classic Cluster Navigation & Filter Bar                                    */
/* ========================================================================== */

.classic-filter-bar {
  position: sticky;
  top: 8px;
  z-index: 30;
  background: color-mix(in srgb, var(--bg-surface, #ffffff) 96%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-default, #c9cdca);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .classic-filter-bar {
  background: color-mix(in srgb, var(--bg-surface, #1c2328) 94%, transparent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.classic-filter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.classic-filter-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
  display: flex;
  align-items: center;
}

.classic-search-input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 34px;
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg-canvas, #f5f4ef);
  color: var(--color-ink, #172126);
  border: 1px solid var(--border-default, #c9cdca);
  border-radius: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.classic-search-input:focus {
  outline: none;
  border-color: var(--color-teal-600, #006d73);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-teal-600, #006d73) 25%, transparent);
}

.classic-search-icon {
  position: absolute;
  left: 10px;
  color: var(--color-ink-muted, #566269);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.classic-search-clear {
  position: absolute;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--color-ink-muted, #566269);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.classic-search-clear:hover {
  background: var(--bg-subtle, #eceae3);
  color: var(--color-ink, #172126);
}

.classic-kind-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle, #eceae3);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.classic-kind-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ink-muted, #566269);
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.classic-kind-btn:hover:not(.is-active) {
  background: color-mix(in srgb, var(--color-ink, #172126) 6%, transparent);
  color: var(--color-ink, #172126);
}

.classic-kind-btn.is-active {
  background: var(--bg-surface, #ffffff);
  color: var(--color-ink, #172126);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .classic-kind-btn.is-active {
  background: var(--bg-surface, #1c2328);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.classic-kind-btn:focus-visible {
  outline: 2px solid var(--color-focus, #7c3aed);
}

.kind-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg-canvas, #f5f4ef);
  color: var(--color-ink-muted, #566269);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.classic-kind-btn.is-active .kind-badge {
  background: var(--color-teal-600, #006d73);
  color: #ffffff;
}

.classic-filter-status {
  font-size: 12px;
  color: var(--color-ink-muted, #566269);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.classic-filter-modules {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-default, #c9cdca);
}

.classic-pills-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink-muted, #566269);
  white-space: nowrap;
  user-select: none;
}

.classic-pills-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.classic-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-default, #c9cdca);
  border-radius: 20px;
  background: var(--bg-canvas, #f5f4ef);
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
  overflow: hidden;
}

.classic-pill:hover {
  border-color: var(--color-teal-600, #006d73);
}

.classic-pill.is-active {
  border-color: var(--color-teal-600, #006d73);
  background: color-mix(in srgb, var(--color-teal-600, #006d73) 14%, var(--bg-surface, #ffffff));
}

[data-theme="dark"] .classic-pill.is-active {
  background: color-mix(in srgb, var(--color-teal-600, #2aa3ab) 20%, var(--bg-surface, #1c2328));
}

.classic-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ink, #172126);
  cursor: pointer;
}

.classic-pill.is-active .classic-pill-btn {
  color: var(--color-teal-600, #006d73);
  font-weight: 700;
}

[data-theme="dark"] .classic-pill.is-active .classic-pill-btn {
  color: var(--color-teal-700, #7fd4d8);
}

.classic-pill-btn:focus-visible {
  outline: 2px solid var(--color-focus, #7c3aed);
}

.pill-badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg-subtle, #eceae3);
  color: var(--color-ink-muted, #566269);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.classic-pill.is-active .pill-badge {
  background: var(--color-teal-600, #006d73);
  color: #ffffff;
}

.classic-pill-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 28px;
  border-left: 1px solid var(--border-default, #c9cdca);
  background: var(--bg-subtle, #eceae3);
  color: var(--color-ink-muted, #566269);
  text-decoration: none;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.classic-pill-jump:hover {
  background: var(--color-teal-600, #006d73);
  color: #ffffff;
}

.classic-pill-jump:focus-visible {
  outline: 2px solid var(--color-focus, #7c3aed);
}

.classic-pill.is-active .classic-pill-jump {
  border-left-color: color-mix(in srgb, var(--color-teal-600, #006d73) 30%, var(--border-default, #c9cdca));
}

.classic-module-section {
  margin: 28px 0;
  scroll-margin-top: 90px;
}

.classic-module-section[hidden] {
  display: none !important;
}

.classic-heading-anchor {
  margin-right: 8px;
  color: var(--color-ink-muted, #566269);
  text-decoration: none;
  font-weight: normal;
  opacity: 0.35;
  transition: opacity 0.15s, color 0.15s;
}

.classic-heading-anchor:hover {
  opacity: 1;
  color: var(--color-teal-600, #006d73);
}

.classic-entry {
  border: 1px solid var(--border-default, #c9cdca);
  border-radius: 6px;
  background: var(--bg-surface, #ffffff);
  padding: 14px 18px;
  margin: 10px 0;
  scroll-margin-top: 90px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.classic-entry:hover {
  border-color: color-mix(in srgb, var(--color-teal-600, #006d73) 50%, var(--border-default, #c9cdca));
}

.classic-entry:target {
  border-color: var(--color-teal-600, #006d73);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-teal-600, #006d73) 30%, transparent);
}

.classic-entry[hidden] {
  display: none !important;
}

.classic-filter-empty {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-surface, #ffffff);
  border: 1px dashed var(--border-default, #c9cdca);
  border-radius: 8px;
  margin: 24px 0;
}

.classic-empty-msg {
  font-size: 15px;
  color: var(--color-ink-muted, #566269);
  margin: 0 0 14px;
}

.classic-btn-reset {
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: var(--color-teal-600, #006d73);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.classic-btn-reset:hover {
  background: var(--color-teal-700, #004e53);
}

/* RTL Support */
[dir="rtl"] .classic-search-icon {
  left: auto;
  right: 10px;
}

[dir="rtl"] .classic-search-clear {
  right: auto;
  left: 6px;
}

[dir="rtl"] .classic-search-input {
  padding: 0 34px 0 32px;
}

[dir="rtl"] .classic-pill-jump {
  border-left: none;
  border-right: 1px solid var(--border-default, #c9cdca);
}

[dir="rtl"] .classic-heading-anchor {
  margin-right: 0;
  margin-left: 8px;
}

/* Compact Density */
[data-density="compact"] .classic-filter-bar {
  padding: 8px 12px;
  margin: 10px 0 16px;
}

[data-density="compact"] .classic-filter-top {
  gap: 8px;
  margin-bottom: 8px;
}

[data-density="compact"] .classic-search-input {
  height: 30px;
  font-size: 13px;
}

[data-density="compact"] .classic-kind-btn {
  height: 26px;
  font-size: 12px;
  padding: 0 8px;
}

[data-density="compact"] .classic-filter-modules {
  padding-top: 8px;
  gap: 6px;
}

[data-density="compact"] .classic-pill-btn {
  height: 24px;
  font-size: 12px;
  padding: 0 8px;
}

[data-density="compact"] .classic-pill-jump {
  height: 24px;
  width: 20px;
  font-size: 10px;
}

[data-density="compact"] .classic-entry {
  padding: 10px 14px;
  margin: 6px 0;
}

/* Responsive Layout */
@media (max-width: 767px) {
  .classic-filter-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .classic-filter-search {
    width: 100%;
    min-width: 0;
  }
  .classic-kind-switch {
    width: 100%;
    justify-content: center;
  }
  .classic-kind-btn {
    flex: 1;
    justify-content: center;
  }
  .classic-filter-status {
    text-align: center;
  }
}

/* Agent Context & Evidence Dossier Modal */
.dossier-open-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.16s, text-decoration-color 0.16s;
}
.dossier-open-link:hover {
  color: var(--primary-hover);
  text-decoration-style: solid;
}
.ai-badge-dossier-btn {
  display: inline-block;
  vertical-align: middle;
  background: transparent;
  border: 0;
  margin: 0 0 0 5px;
  padding: 0 2px;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
  text-decoration: none;
}
.ai-badge-dossier-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.1);
  color: inherit;
  text-decoration: none;
}
.dossier-modal {
  position: fixed;
  inset: 0;
  width: min(960px, 95vw);
  height: min(840px, 90vh);
  min-width: 600px;
  min-height: 420px;
  max-width: 98vw;
  max-height: 94vh;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface, #ffffff);
  color: var(--text, #172126);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  padding: 0;
  overflow: hidden;
  resize: both;
  z-index: 1050;
  box-sizing: border-box;
}
.dossier-modal.has-chat-open {
  width: min(1540px, 98vw);
  height: min(900px, 92vh);
}
.dossier-modal::backdrop {
  background: rgba(18, 23, 26, 0.65);
  backdrop-filter: blur(2px);
}
.dossier-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle, #f5f4ef);
}
.dossier-modal-head h3 {
  margin: 0;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-toggle-workbench-chat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-default, #c9cdca);
  background: #ffffff;
  color: #01696f;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-toggle-workbench-chat:hover {
  background: #e7f3f4;
  border-color: #01696f;
}
.header-chat-badge {
  background: #01696f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.dossier-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #666);
  padding: 4px 8px;
  border-radius: 4px;
}
.dossier-close-btn:hover {
  background: var(--border, #ccc);
  color: var(--text, #000);
}
.dossier-modal-body {
  padding: 14px 18px;
  overflow: hidden;
  height: calc(100% - 50px);
  max-height: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.dossier-modal.has-chat-open .dossier-modal-body {
  max-height: none;
  height: calc(100% - 50px);
}

/* Dossier View Modes (Raw Agent Prompt, Rich Text, Editor) */
.dossier-mode-switcher {
  display: inline-flex;
  background: var(--bg-subtle, #f0eee6);
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.dossier-mode-tab {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  /* Same weight in every state: a bolder active tab is wider and shifts its neighbours. */
  font-weight: 650;
  color: var(--color-ink, #444);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dossier-mode-tab:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #111;
}

.dossier-mode-tab.is-active {
  background: #ffffff;
  color: #01696f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 -2px 0 #01696f;
}

.dossier-mode-tab:focus-visible {
  outline: 2px solid #5b5bd6;
  outline-offset: 1px;
}

.raw-subtab.is-dragging {
  opacity: 0.55;
}

.raw-subtab.is-drop-target {
  box-shadow: 0 0 0 2px #5b5bd6;
  border-radius: 4px;
}

.dossier-view-mode {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dossier-view-mode[hidden] {
  display: none !important;
}

/* Plaintext Prompt View & Raw Prompt */
.dossier-view-prompt,
.dossier-view-raw {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-height: 0;
}

.dossier-view-editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.dossier-view-editor .dossier-workbench-layout,
.dossier-view-editor .dossier-viewer-pane {
  flex: 1;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
}

.dossier-view-editor .snippets-container {
  /* Der Viewer-Bereich scrollt als Ganzes: Mit Hunderten konstituierender Records blieb für einen
     eigenen Scrollbereich der Belege keine Höhe, die Karten schrumpften auf 2 px. */
  flex: none;
  min-height: auto;
  overflow-y: visible;
}

.dossier-view-editor .snippet-card {
  flex-shrink: 0;
}

.raw-prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-default, #e2ded4);
  margin-bottom: 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.btn-copy-raw-prompt {
  background: #01696f;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-copy-raw-prompt:hover {
  background: #005257;
}

.copy-success-hint {
  font-size: 12px;
  color: #137333;
  font-weight: 600;
  margin-left: 8px;
}

.raw-prompt-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  background: var(--bg-subtle, #faf9f5);
  color: var(--color-ink, #28251d);
  padding: 12px;
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 6px;
  width: 100%;
  flex: 1;
  min-height: 200px;
  height: 100% !important;
  box-sizing: border-box;
  resize: none;
}

.raw-prompt-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  background: var(--bg-subtle, #faf9f5);
  color: var(--color-ink, #28251d);
  padding: 16px;
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  user-select: text;
}

/* Output & Vergleich View */
.dossier-view-output {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Snippet Mini-Curation Tool & Discussion */
.snippet-curation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-default, #dcd7ce);
}

.curation-btn-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.curation-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border-default, #c9cdca);
  background: var(--bg-surface, #ffffff);
  color: var(--color-ink, #28251d);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.curation-btn:hover {
  background: var(--bg-subtle, #f5f4ef);
  border-color: #a8aca7;
}

.curation-btn:focus-visible {
  outline: 2px solid #01696f;
  outline-offset: 2px;
}

.curation-btn.btn-confirm.is-active {
  background: #e6f4ea;
  border-color: #34a853;
  color: #137333;
  font-weight: 600;
}

.curation-btn.btn-dismiss.is-active {
  background: #fce8e6;
  border-color: #ea4335;
  color: #c5221f;
  font-weight: 600;
}

.curation-btn.btn-discuss.is-active {
  background: #e7f3f4;
  border-color: #01696f;
  color: #01696f;
  font-weight: 600;
}

.curation-status-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
}

.curation-status-pill.status-neutral {
  background: #f1f0eb;
  color: #666;
}

.curation-status-pill.status-confirmed {
  background: #e6f4ea;
  color: #137333;
  border: 1px solid #ceead6;
}

.curation-status-pill.status-dismissed {
  background: #fce8e6;
  color: #c5221f;
  border: 1px solid #fad2cf;
}

.curation-status-pill.status-queued {
  background: #fef7e0;
  color: #b06000;
  border: 1px solid #feefc3;
}

.curation-status-pill.status-in-discussion {
  background: #e0f2f1;
  color: #004d40;
  border: 1px solid #80cbc4;
  font-weight: 700;
}

.curation-status-pill.status-justified-dismiss {
  background: #fce8e6;
  color: #a51d24;
  border: 1px solid #ea4335;
  font-weight: 700;
}

.curation-status-pill.status-justified-confirm {
  background: #e6f4ea;
  color: #0d652d;
  border: 1px solid #34a853;
  font-weight: 700;
}

.btn-clear-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  border: none;
  font-size: 9.5px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  margin-left: 5px;
  padding: 0;
  vertical-align: middle;
  transition: background-color 0.15s;
}

.btn-clear-badge:hover {
  background: rgba(0, 0, 0, 0.28);
  color: #000;
}

/* Discussion and Focus States */
.snippet-card.is-in-discussion {
  border-color: #01696f !important;
  border-left-width: 6px !important;
  background: #f0f7f7 !important;
  box-shadow: 0 0 0 2px rgba(1, 105, 111, 0.28) !important;
  transition: all 0.18s ease-in-out;
}

/* Snippet Card Structure & Collapsible States */
.snippet-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.snippet-card.is-selected {
  background: linear-gradient(135deg, #ede9fe 0%, #e0f2fe 100%) !important;
  border-color: #5b5bd6 !important;
  box-shadow: 0 0 0 2px rgba(91, 91, 214, 0.45), inset 0 0 0 1px rgba(37, 99, 235, 0.15) !important;
}

/* Snippet-Metadaten: Frequenz- und Blitz-Zähler ausblenden */
.snippet-card .snippet-freq-counter,
.snippet-card .snippet-flash-counter,
.snippet-card .snippet-meta-freq,
.snippet-card .snippet-meta-flash,
.snippet-card [data-snippet-counter="freq"],
.snippet-card [data-snippet-counter="flash"],
.snippet-card-summary .snippet-hit-freq,
.snippet-card-summary .snippet-hit-flash {
  display: none !important;
}

.card-select-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #01696f;
  margin: 0 2px 0 0;
  flex-shrink: 0;
}

/* When multiselection is active, suppress individual card buttons so actions are offered only ONCE */
.has-active-selection .snippet-card .curation-btn-group {
  display: none !important;
}

.snippet-card.inbound-snippet-card {
  border-left: 4px solid #01696f;
}

.snippet-card.constituting-record-card {
  border-left: 4px solid #005f73;
}

.snippet-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  background: var(--bg-surface, #ffffff);
  transition: background-color 0.15s ease;
}

.snippet-card-header:hover {
  background: var(--bg-subtle, #f5f4ef);
}

.snippet-card-header:focus-visible {
  outline: 2px solid #01696f;
  outline-offset: -2px;
}

.snippet-card-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.card-chevron {
  display: inline-block;
  font-size: 11px;
  width: 14px;
  text-align: center;
  color: #777;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.snippet-card.is-expanded .card-chevron {
  transform: rotate(90deg);
  color: #01696f;
}

.snippet-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-ink, #1f2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.snippet-sws {
  font-size: 11.5px;
  background: #edf2f7;
  color: #2d3748;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.chip-kind {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.chip-kind.kind-function {
  background: #e3f2fd;
  color: #0d47a1;
}

.chip-kind.kind-type {
  background: #f3e5f5;
  color: #4a148c;
}

.chip-kind.kind-inbound {
  background: #eef5f5;
  color: #01696f;
}

.chip-doc {
  font-size: 11px;
  color: #666;
  background: #f0f0ee;
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.snippet-card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.snippet-card-header-actions .curation-btn {
  padding: 4px 8px;
  font-size: 12px;
}

.snippet-card-body {
  padding: 12px 14px;
  border-top: 1px solid var(--border-default, #edebe4);
  background: var(--bg-surface, #ffffff);
}

.snippet-card.is-collapsed .snippet-card-body {
  display: none !important;
}

.snippet-card.is-expanded .snippet-card-body {
  display: block;
}

/* Multiselection Batch Action Bar */
.dossier-selection-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  background: #01696f;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(1, 105, 111, 0.35);
}

.dossier-selection-bar[hidden] {
  display: none !important;
}

.selection-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.selection-indicator {
  font-size: 15px;
}

.selection-key-hint {
  font-size: 11px;
  opacity: 0.85;
  margin-left: 6px;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.selection-actions .curation-btn {
  background: #ffffff;
  color: #222;
  border: none;
  font-size: 12px;
  padding: 4px 10px;
  font-weight: 600;
}

.selection-actions .curation-btn:hover {
  background: #f0f7f7;
}

.selection-actions .btn-confirm {
  color: #137333;
}

.selection-actions .btn-dismiss {
  color: #c5221f;
}

.selection-actions .btn-discuss {
  color: #01696f;
}

.btn-clear-selection {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clear-selection:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Sticky Dossier Toolbar & Search/Filter Bar */
.dossier-toolbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.dossier-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.dossier-search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: #888;
  pointer-events: none;
}

.dossier-search-input {
  width: 100%;
  padding: 7px 32px 7px 32px;
  font-size: 13px;
  border: 1px solid var(--border-default, #ccc);
  border-radius: 6px;
  background: var(--bg-surface, #ffffff);
  color: var(--color-ink, #222);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dossier-search-input:focus {
  border-color: #01696f;
  box-shadow: 0 0 0 2px rgba(1, 105, 111, 0.2);
}

.btn-clear-dossier-search {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 17px;
  color: #888;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.btn-clear-dossier-search:hover {
  background: #eee;
  color: #222;
}

.dossier-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.dossier-filter-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-right: 2px;
}

.dossier-filter-pill {
  background: var(--bg-subtle, #f5f4ef);
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-ink, #333);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dossier-filter-pill:hover {
  background: #ebe9e1;
  border-color: #bcb8ae;
}

.dossier-filter-pill.is-active {
  background: #01696f;
  color: #ffffff;
  border-color: #01696f;
  font-weight: 600;
}

.dossier-filter-pill .pill-count {
  font-size: 10.5px;
  opacity: 0.85;
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
}

.dossier-filter-pill.is-active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.dossier-view-toggle-group {
  display: inline-flex;
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 6px;
  overflow: hidden;
}

.dossier-toggle-btn {
  background: var(--bg-surface, #ffffff);
  border: none;
  border-right: 1px solid var(--border-default, #dcd7ce);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dossier-toggle-btn:last-child {
  border-right: none;
}

.dossier-toggle-btn:hover {
  background: #f5f4ef;
  color: #222;
}

.dossier-toggle-btn.is-active {
  background: #eef5f5;
  color: #01696f;
  font-weight: 600;
}

.dossier-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #777;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed var(--border-default, #e8e5dc);
}

.btn-reset-dossier-filters {
  background: transparent;
  border: none;
  color: #01696f;
  text-decoration: underline;
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
}

/* Dossier Split Workbench Layout */
.dossier-workbench-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.dossier-viewer-pane {
  flex: 1 1 58%;
  min-width: 0;
  overflow-y: auto;
  max-height: calc(88vh - 65px);
  padding-right: 8px;
}

.dossier-modal.has-chat-open .dossier-viewer-pane {
  max-height: calc(92vh - 65px);
}

.dossier-chat-pane {
  flex: 1 1 42%;
  min-width: 340px;
  max-width: 540px;
  background: var(--bg-subtle, #f8f7f2);
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  max-height: calc(88vh - 65px);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.dossier-modal.has-chat-open .dossier-chat-pane {
  max-height: calc(92vh - 65px);
}

.dossier-chat-pane[hidden] {
  display: none !important;
}

.chat-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface, #ffffff);
  border-bottom: 1px solid var(--border-default, #e2ded4);
}

.chat-pane-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-attached-count {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0f2f1;
  color: #004d40;
}

.btn-chat-pane-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #888;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-chat-pane-close:hover {
  background: #eee;
  color: #222;
}

.chat-attached-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface, #ffffff);
  border-bottom: 1px solid var(--border-default, #e2ded4);
  font-size: 12px;
  flex-wrap: wrap;
}

.chat-attached-label {
  font-weight: 700;
  color: #555;
  font-size: 11.5px;
}

.chat-attached-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.chat-attached-empty-hint {
  font-size: 11.5px;
  color: #888;
  font-style: italic;
}

.chat-attached-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #e7f3f4;
  border: 1px solid #b2dfdb;
  color: #004d40;
  font-size: 11.5px;
  font-weight: 600;
}

.btn-detach-item {
  background: transparent;
  border: none;
  font-size: 11px;
  cursor: pointer;
  color: #004d40;
  padding: 0 2px;
  line-height: 1;
}

.btn-detach-item:hover {
  color: #d32f2f;
}

.btn-clear-attached {
  background: transparent;
  border: 1px dashed #c9cdca;
  font-size: 11px;
  color: #666;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
}

.btn-clear-attached:hover {
  border-color: #ea4335;
  color: #c5221f;
  background: #fce8e6;
}

.chat-pane-thread {
  flex: 1;
  min-height: 180px;
  max-height: 100%;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface, #ffffff);
}

.chat-system-note {
  align-self: center;
  font-size: 11px;
  color: #666;
  background: rgba(0, 0, 0, 0.04);
  padding: 3px 8px;
  border-radius: 12px;
}

.chat-bubble {
  max-width: 90%;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}

.chat-bubble.bubble-assistant {
  align-self: flex-start;
  background: #f5f4ef;
  color: #28251d;
  border-left: 3px solid #01696f;
}

.chat-bubble.bubble-user {
  align-self: flex-end;
  background: #01696f;
  color: #ffffff;
}

.chat-pane-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-surface, #ffffff);
  border-top: 1px solid var(--border-default, #e2ded4);
}

.workbench-prompt-chip {
  background: var(--bg-surface, #ffffff);
  border: 1px solid #c9cdca;
  color: #28251d;
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.workbench-prompt-chip:hover {
  background: #e7f3f4;
  border-color: #01696f;
  color: #01696f;
}

.workbench-prompt-chip.chip-criticism:hover {
  background: #fce8e6;
  border-color: #ea4335;
  color: #c5221f;
}

.chat-pane-form {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-surface, #ffffff);
  border-top: 1px solid var(--border-default, #e2ded4);
}

.chat-pane-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #c9cdca;
  border-radius: 6px;
  background: var(--bg-surface, #ffffff);
  color: inherit;
}

.chat-pane-input:focus {
  outline: 2px solid #01696f;
  outline-offset: 1px;
}

.chat-pane-send-btn {
  padding: 8px 14px;
  background: #01696f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.chat-pane-send-btn:hover {
  background: #0b4e54;
}

.chat-pane-proposal-box {
  margin: 8px 12px 12px;
  padding: 10px 12px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
}

.proposal-card-header {
  font-weight: 700;
  font-size: 12px;
  color: #8d6e19;
  margin-bottom: 4px;
}

.proposal-card-body {
  font-size: 12px;
  color: #424242;
  white-space: pre-wrap;
  margin-bottom: 8px;
  line-height: 1.4;
}

.proposal-exit-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-default, #dcd7ce);
}

.proposal-exit-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
}

.btn-proposal-exit {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-exit-queue {
  background: #01696f;
  color: #ffffff;
  border-color: #004d52;
}

.btn-exit-queue:hover {
  background: #005358;
}

.btn-exit-local {
  background: #ffffff;
  color: #01696f;
  border-color: #01696f;
}

.btn-exit-local:hover {
  background: #eef5f5;
}

.btn-submit-workbench-proposal {
  width: 100%;
  padding: 7px 12px;
  background: #01696f;
  color: #ffffff;
  border: 1px solid #004d52;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-submit-workbench-proposal:hover {
  background: #005358;
}

.btn-dismiss-proposal {
  background: transparent;
  border: none;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-dismiss-proposal:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #222;
}

/* Backward-compatibility for legacy inline discuss */
.snippet-discuss-panel {
  margin-top: 12px;
  border-top: 1px solid var(--border-default, #e2ded4);
  background: #faf9f6;
  border-radius: 6px;
  padding: 12px;
  font-size: 13.5px;
}

.discuss-focus-banner {
  font-size: 12px;
  color: #555;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #e5e3db;
  margin-bottom: 10px;
}

.snippet-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #e5e3db;
  border-radius: 6px;
  margin-bottom: 10px;
}

.snippet-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.snippet-chip {
  background: #ffffff;
  border: 1px solid #c9cdca;
  color: #28251d;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.snippet-chip:hover {
  background: #e7f3f4;
  border-color: #01696f;
  color: #01696f;
}

.snippet-chat-input-form {
  display: flex;
  gap: 8px;
}

.snippet-msg-input {
  flex: 1;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #c9cdca;
  border-radius: 6px;
  background: #ffffff;
  color: inherit;
}

.snippet-send-btn {
  padding: 7px 14px;
  background: #01696f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit-curation-queue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f59e0b;
  color: #1e1e1e;
  border: 1px solid #d97706;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Dark Mode Overrides */
[data-theme="dark"] .snippet-card.is-in-discussion {
  background: #112327 !important;
  border-color: #38b2ac !important;
  box-shadow: 0 0 0 2px rgba(56, 178, 172, 0.4) !important;
}

[data-theme="dark"] .curation-status-pill.status-in-discussion {
  background: #134e4a;
  color: #a7f3d0;
  border-color: #2dd4bf;
}

[data-theme="dark"] .dossier-chat-pane {
  background: #182026;
  border-color: #2c3842;
}

[data-theme="dark"] .chat-pane-head,
[data-theme="dark"] .chat-attached-bar,
[data-theme="dark"] .chat-pane-chips,
[data-theme="dark"] .chat-pane-form {
  background: #141c22;
  border-color: #2c3842;
}

[data-theme="dark"] .chat-pane-thread {
  background: #11181e;
}

[data-theme="dark"] .chat-bubble.bubble-assistant {
  background: #232c33;
  color: #e5edf2;
}

[data-theme="dark"] .workbench-prompt-chip {
  background: #232c33;
  border-color: #3b4954;
  color: #cad4dc;
}

[data-theme="dark"] .chat-pane-input {
  background: #1c242a;
  border-color: #3b4954;
  color: #ffffff;
}

[data-theme="dark"] .chat-pane-proposal-box {
  background: #2a2416;
  border-color: #5c4819;
}

[data-theme="dark"] .dossier-toolbar {
  background: #182026;
  border-color: #2c3842;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .dossier-search-input {
  background: #141c22;
  border-color: #3b4954;
  color: #ffffff;
}

[data-theme="dark"] .dossier-search-input:focus {
  border-color: #49b3aa;
  box-shadow: 0 0 0 2px rgba(73, 179, 170, 0.25);
}

[data-theme="dark"] .dossier-filter-pill {
  background: #1c242a;
  border-color: #3b4954;
  color: #cad4dc;
}

[data-theme="dark"] .dossier-filter-pill:hover {
  background: #253139;
  border-color: #4f6170;
}

[data-theme="dark"] .dossier-filter-pill.is-active {
  background: #01696f;
  border-color: #01696f;
  color: #ffffff;
}

[data-theme="dark"] .dossier-toggle-btn {
  background: #1c242a;
  border-color: #3b4954;
  color: #cad4dc;
}

[data-theme="dark"] .dossier-toggle-btn:hover {
  background: #253139;
}

[data-theme="dark"] .dossier-toggle-btn.is-active {
  background: #14373a;
  color: #6edfd5;
}

[data-theme="dark"] .snippet-card {
  background: #182026;
  border-color: #2c3842;
}

[data-theme="dark"] .snippet-card-header {
  background: #182026;
}

[data-theme="dark"] .snippet-card-header:hover {
  background: #1f2a33;
}

[data-theme="dark"] .snippet-card-body {
  background: #141c22;
  border-top-color: #2c3842;
}

[data-theme="dark"] .snippet-title {
  color: #e5edf2;
}

[data-theme="dark"] .snippet-sws {
  background: #202d38;
  color: #8bb2d6;
}

[data-theme="dark"] .chip-doc {
  background: #202d38;
  color: #a0aec0;
}

[data-theme="dark"] .dossier-filter-summary {
  border-top-color: #2c3842;
}

[data-theme="dark"] .dossier-mode-switcher {
  background: #141c22;
  border-color: #2c3842;
}

[data-theme="dark"] .dossier-mode-tab {
  color: #cad4dc;
}

[data-theme="dark"] .dossier-mode-tab:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .dossier-mode-tab.is-active {
  background: #232c33;
  color: #6edfd5;
}

[data-theme="dark"] .raw-prompt-toolbar {
  background: #182026;
  border-color: #2c3842;
}

[data-theme="dark"] .raw-prompt-text {
  background: #11181e;
  color: #e5edf2;
  border-color: #2c3842;
}

[data-theme="dark"] .dossier-selection-bar {
  background: #004d52;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .snippet-card.is-selected {
  background: linear-gradient(135deg, #1e1b4b 0%, #134e4a 100%) !important;
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.5) !important;
}

[data-theme="dark"] .btn-exit-local {
  background: #1c272a;
  color: #6edfd5;
  border-color: #38b2ac;
}

[data-theme="dark"] .btn-clear-badge {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .btn-clear-badge:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Spec-Record Jump Links & Chip Grid */
.rec-jump-link {
  color: var(--accent, #01696f);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.rec-jump-link:hover {
  text-decoration-style: solid;
  background-color: rgba(1, 105, 111, 0.08);
  border-radius: 2px;
}

.record-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-default, #dcd7ce);
  border-radius: 4px;
  font-size: 0.82em;
  color: var(--text, #172126);
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-item-chip:hover {
  border-color: var(--accent, #01696f);
  background: var(--bg-hover, #f0f7f6);
}

.record-item-chip .chip-kind {
  font-size: 0.72em;
  padding: 1px 4px;
  border-radius: 3px;
  background: #eef5f5;
  color: #01696f;
  text-transform: uppercase;
  font-weight: 600;
}

.rec-jump-focus {
  animation: recJumpPulse 2.4s ease-out;
  outline: 2px solid var(--accent, #01696f);
  outline-offset: 4px;
  border-radius: 4px;
}

@keyframes recJumpPulse {
  0% { background-color: rgba(1, 105, 111, 0.35); }
  40% { background-color: rgba(1, 105, 111, 0.15); }
  100% { background-color: transparent; }
}

[data-theme="dark"] .record-item-chip {
  background: #1e262c;
  border-color: #3b4954;
  color: #e5edf2;
}

[data-theme="dark"] .record-item-chip:hover {
  background: #28333b;
  border-color: #49b3aa;
}

[data-theme="dark"] .record-item-chip .chip-kind {
  background: #14373a;
  color: #6edfd5;
}

[data-theme="dark"] .rec-jump-link {
  color: #6edfd5;
}

/* --- 1:1 LLM Prompt & Side-by-Side Diff View in Dossier --- */
.dossier-view-prompt .raw-prompt-textarea,
.dossier-view-raw .raw-prompt-textarea,
#dossier-view-prompt .raw-prompt-textarea {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100% !important;
  max-height: none;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 12px;
  border: 1px solid var(--border-default, #ccc);
  border-radius: 6px;
  box-sizing: border-box;
  background: var(--bg-canvas, #fafafa);
  color: var(--color-ink, #222);
  resize: none;
  overflow-y: auto;
  tab-size: 2;
  white-space: pre;
}

[data-theme="dark"] .raw-prompt-textarea {
  background: #151b20;
  border-color: #3b4954;
  color: #e5edf2;
}

.btn-execute-prompt {
  background: #01696f;
  color: #fff;
  border: 1px solid #00565b;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-execute-prompt:hover:not(:disabled) {
  background: #00565b;
  box-shadow: 0 2px 6px rgba(1, 105, 111, 0.25);
  transform: translateY(-1px);
}

.btn-execute-prompt:disabled {
  opacity: 0.65;
  cursor: wait;
}

[data-theme="dark"] .btn-execute-prompt {
  background: #0f766e;
  border-color: #14b8a6;
  color: #f0fdfa;
}

[data-theme="dark"] .btn-execute-prompt:hover:not(:disabled) {
  background: #115e59;
}

.prompt-diff-container {
  margin-top: 16px;
  border: 1px solid var(--border-default, #ddd);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  background: var(--bg-surface, #fff);
}

[data-theme="dark"] .prompt-diff-container {
  border-color: #3b4954;
  background: #1a2228;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.prompt-diff-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-subtle, #f0f0ee);
  border-bottom: 1px solid var(--border-default, #ddd);
}

[data-theme="dark"] .prompt-diff-header {
  background: #222c34;
  border-bottom-color: #3b4954;
}

/* Provenance Explorer / Side-by-Side Split Diff */
.ve-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border-default, #ddd);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-subtle, #f0f0ee);
}

.ve-view-btn {
  padding: 0.35rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--color-ink-muted, #666);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-view-btn.is-active {
  background: var(--color-teal-600, #01696f);
  color: #fff;
}

[data-theme="dark"] .ve-view-toggle {
  border-color: #3b4954;
  background: #222c34;
}

[data-theme="dark"] .ve-view-btn {
  color: #94a3b8;
}

[data-theme="dark"] .ve-view-btn.is-active {
  background: #0d9488;
  color: #fff;
}

.ve-split-diff-wrapper {
  border: 1px solid var(--border-default, #ddd);
  border-radius: 12px;
  overflow: hidden;
  overscroll-behavior: contain;
  overflow-anchor: none;
  max-height: 650px;
  height: 600px;
  background: var(--bg-canvas, #fafafa);
  position: relative;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .ve-split-diff-wrapper {
  border-color: #3b4954;
  background: #151b20;
}

.ve-split-columns {
  display: grid;
  grid-template-columns: 1fr 70px 1fr;
  position: relative;
  min-width: 680px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ve-split-pane {
  background: var(--bg-canvas, #fafafa);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

[data-theme="dark"] .ve-split-pane {
  background: #151b20;
}

.ve-split-left {
  border-right: 1px solid var(--border-subtle, #e5e7eb);
}

[data-theme="dark"] .ve-split-left {
  border-right-color: #3b4954;
}

.ve-split-right {
  border-left: 1px solid var(--border-subtle, #e5e7eb);
}

[data-theme="dark"] .ve-split-right {
  border-left-color: #3b4954;
}

.ve-split-header {
  padding: 0.75rem 1rem;
  background: var(--bg-subtle, #f0f0ee);
  border-bottom: 1px solid var(--border-default, #ddd);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 5;
}

.ve-header-left {
  border-top: 3px solid #2563eb;
}

.ve-header-gutter {
  border-top: 3px solid var(--color-teal-600, #01696f);
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-ink-muted, #666);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.5rem;
}

.ve-header-right {
  border-top: 3px solid #16a34a;
}

[data-theme="dark"] .ve-split-header {
  background: #222c34;
  border-bottom-color: #3b4954;
  color: #94a3b8;
}

.ve-split-body {
  padding: 1rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  overflow-anchor: none;
  position: relative;
  box-sizing: border-box;
}

.ve-split-body::-webkit-scrollbar {
  width: 6px;
}
.ve-split-body::-webkit-scrollbar-thumb {
  background: var(--border-default, #ccc);
  border-radius: 3px;
}

/* SVG Gutter & Connector Ribbons (Mittelinsel) */
.ve-split-gutter {
  position: relative;
  width: 70px;
  background: var(--bg-canvas, #fafafa);
  border-left: 1px solid var(--border-subtle, #e5e7eb);
  border-right: 1px solid var(--border-subtle, #e5e7eb);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

[data-theme="dark"] .ve-split-gutter {
  background: #151b20;
  border-left-color: #3b4954;
  border-right-color: #3b4954;
}

.ve-gutter-canvas-wrap {
  position: relative;
  flex: 1;
  width: 70px;
  min-height: 0;
  overflow: hidden;
}

.ve-gutter-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 70px;
  height: 100%;
  pointer-events: all;
  overflow: visible;
}

.ve-connector {
  cursor: pointer;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}

.ve-connector-replace {
  fill: rgba(217, 119, 6, 0.18);
  stroke: #d97706;
  stroke-width: 1;
}

.ve-connector-delete {
  fill: rgba(220, 38, 38, 0.18);
  stroke: #dc2626;
  stroke-width: 1;
}

.ve-connector-insert {
  fill: rgba(22, 163, 74, 0.18);
  stroke: #16a34a;
  stroke-width: 1;
}

.ve-connector.is-hovered {
  opacity: 0.95;
  stroke-width: 2.5;
}

/* Block & Word-level diff styles */
.ve-block {
  margin: 0.4rem 0;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.ve-block-equal {
  background: transparent;
  color: var(--color-ink, inherit);
  border-left-color: transparent;
}

.ve-block-deleted {
  background: rgba(220, 38, 38, 0.12);
  border-left-color: #dc2626;
  color: var(--color-ink, inherit);
}

.ve-block-added {
  background: rgba(22, 163, 74, 0.12);
  border-left-color: #16a34a;
  color: var(--color-ink, inherit);
}

.ve-block-replaced.ve-block-left {
  background: rgba(220, 38, 38, 0.08);
  border-left-color: #dc2626;
  color: var(--color-ink, inherit);
}

.ve-block-replaced.ve-block-right {
  background: rgba(22, 163, 74, 0.08);
  border-left-color: #16a34a;
  color: var(--color-ink, inherit);
}

.ve-block.is-hovered {
  box-shadow: 0 0 0 2px var(--color-teal-600, #01696f);
}

.ve-block.ve-block-anchor {
  display: block !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.ve-block-placeholder {
  height: 4px !important;
  min-height: 4px !important;
  margin: 3px 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 2px;
  box-sizing: border-box;
}

.ve-placeholder-delete {
  background: rgba(220, 38, 38, 0.45);
}

.ve-placeholder-insert {
  background: rgba(22, 163, 74, 0.45);
}

.ve-word-deleted, del.ve-word-deleted {
  background: rgba(220, 38, 38, 0.28);
  color: #991b1b;
  border-radius: 3px;
  padding: 0 3px;
  text-decoration: line-through;
  font-weight: 600;
}

[data-theme="dark"] .ve-word-deleted, [data-theme="dark"] del.ve-word-deleted {
  background: rgba(239, 68, 68, 0.38);
  color: #fca5a5;
}

.ve-word-added, ins.ve-word-added {
  background: rgba(22, 163, 74, 0.28);
  color: #14532d;
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 600;
  text-decoration: none;
}

[data-theme="dark"] .ve-word-added, [data-theme="dark"] ins.ve-word-added {
  background: rgba(34, 197, 94, 0.38);
  color: #86efac;
}

/* Unified Diff */
.ve-unified-container {
  border: 1px solid var(--border-default, #ddd);
  border-radius: 12px;
  overflow: hidden;
  overscroll-behavior: contain;
  overflow-anchor: none;
  background: var(--bg-canvas, #fafafa);
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
}

[data-theme="dark"] .ve-unified-container {
  border-color: #3b4954;
  background: #151b20;
}

.ve-diff-line {
  display: flex;
  gap: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
  line-height: 1.5;
}

[data-theme="dark"] .ve-diff-line {
  border-bottom-color: #26333d;
}

.ve-diff-added {
  background: rgba(22, 163, 74, 0.12);
  color: var(--color-ink, inherit);
}

.ve-diff-deleted {
  background: rgba(220, 38, 38, 0.12);
  color: var(--color-ink, inherit);
}

.ve-diff-unchanged {
  background: transparent;
  color: var(--color-ink-muted, #888);
}

.ve-diff-marker {
  font-weight: 700;
  user-select: none;
  width: 1.2rem;
}

.ve-diff-text {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   3-Reiter-Konzept für Plaintext-Ansicht (Prompt, Aktueller Output, Vorschau)
   ========================================================================== */

.raw-subtab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border-default, #e5e7eb);
  margin-bottom: 8px;
  padding: 0 2px;
  flex-wrap: wrap;
  background: var(--bg-canvas, #fafafa);
}

[data-theme="dark"] .raw-subtab-bar {
  background: #151b20;
  border-bottom-color: #3b4954;
}

.raw-subtab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border-default, #d1d5db);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: var(--bg-subtle, #f3f4f6);
  color: var(--color-ink-muted, #4b5563);
  font-size: 0.76rem;
  /* Constant weight in all states (idle/active/running/error) so labels never change width. */
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  position: relative;
  bottom: -1px;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  user-select: none;
  line-height: 1.25;
  white-space: nowrap;
}

[data-theme="dark"] .raw-subtab {
  background: #1e262c;
  border-color: #3b4954;
  color: #94a3b8;
}

.raw-subtab:hover {
  background: var(--bg-surface, #fff);
  color: var(--color-ink, #111);
}

[data-theme="dark"] .raw-subtab:hover {
  background: #25313a;
  color: #f1f5f9;
}

.raw-subtab.is-active {
  background: var(--bg-surface, #fff);
  color: var(--color-teal-700, #01696f);
  border-color: var(--border-default, #d1d5db);
  border-top: 2px solid var(--color-teal-600, #01696f);
  border-bottom: 1px solid var(--bg-surface, #fff);
  z-index: 2;
}

[data-theme="dark"] .raw-subtab.is-active {
  background: #151b20;
  color: #2dd4bf;
  border-color: #3b4954;
  border-top-color: #0d9488;
  border-bottom-color: #151b20;
}

/* Fixed-width status slot and timer: spinner / "!" / clock never resize the tab. */
.subtab-status {
  display: inline-block;
  width: 1.2em;
  text-align: center;
  flex: 0 0 auto;
}

.subtab-timer {
  display: inline-block;
  min-width: 5.2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 500;
}

.subtab-click-area {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Compare selection & linking states */
.raw-subtab.is-compare-source {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
  animation: pulseCompare 1.5s infinite;
}

@keyframes pulseCompare {
  0% { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.6); }
  100% { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3); }
}

.raw-subtab.is-compare-linked {
  border-color: var(--color-teal-600, #01696f) !important;
  border-top: 3px solid var(--color-teal-600, #01696f) !important;
  background: #eaf2f1 !important;
  color: #01696f !important;
}

[data-theme="dark"] .raw-subtab.is-compare-linked {
  border-color: #0d9488 !important;
  border-top-color: #0d9488 !important;
  background: #132b2f !important;
  color: #2dd4bf !important;
}

/* Inline Comboboxes inside Preview Tabs */
.subtab-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.subtab-select-model,
.subtab-select-effort {
  font-size: 0.72rem;
  padding: 1px 3px;
  border-radius: 3px;
  border: 1px solid var(--border-default, #ccc);
  background: var(--bg-surface, #fff);
  color: var(--color-ink, #222);
  cursor: pointer;
  height: 20px;
  max-width: 125px;
}

/* Modell-IDs eigener Endpunkte sind lang (z. B. anthropic/claude-sonnet-4.5) */
.subtab-select-model {
  max-width: 230px;
}

/* Einladung des KI-Zugangs im Vorschau-Bereich, wenn kein Modell nutzbar ist */
.raw-preview-gate {
  padding: 28px 20px;
  border: 1px dashed var(--border-default, #ccc);
  border-radius: 8px;
  background: var(--bg-canvas, #fafafa);
}

.raw-preview-gate .aia-gate {
  justify-items: center;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

[data-theme="dark"] .raw-preview-gate {
  background: #1f2937;
  border-color: #374151;
}

[data-theme="dark"] .subtab-select-model,
[data-theme="dark"] .subtab-select-effort {
  background: #25313a;
  border-color: #4b5563;
  color: #e5e7eb;
}

.subtab-select-model:disabled,
.subtab-select-effort:disabled {
  opacity: 0.75;
  cursor: default;
  background: #e5e7eb;
  border-color: #d1d5db;
}

[data-theme="dark"] .subtab-select-model:disabled,
[data-theme="dark"] .subtab-select-effort:disabled {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
}

.btn-subtab-start {
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 3px;
  border: none;
  background: var(--color-teal-600, #01696f);
  color: #fff;
  cursor: pointer;
  height: 20px;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s;
}

.btn-subtab-start:hover {
  background: #015257;
}

.btn-subtab-cancel,
.btn-subtab-close {
  background: none;
  border: 1px solid #d1d5db;
  padding: 0;
  width: 16px;
  height: 16px;
  font-size: 10px;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.btn-subtab-cancel:hover,
.btn-subtab-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border-color: #fca5a5;
}

.btn-compare-tab {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.74rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  line-height: 1;
  transition: all 0.15s;
}

.btn-compare-tab:hover {
  background: #dcfce7;
  border-color: #22c55e;
}

[data-theme="dark"] .btn-compare-tab {
  background: #143522;
  border-color: #166534;
  color: #86efac;
}

/* Link Symbol Badge */
.raw-tab-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--color-teal-600, #01696f);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.15s, background 0.15s;
}

.raw-tab-link-badge:hover {
  background: #015257;
  transform: scale(1.03);
}

.raw-compare-hint-bar {
  padding: 6px 12px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #92400e;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .raw-compare-hint-bar {
  background: #2e2614;
  border-color: #453617;
  color: #fcd34d;
}

/* Content Panes */
.raw-subtab-content-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.raw-content-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.raw-pane-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.84em;
  color: var(--color-ink-muted, #666);
  flex-shrink: 0;
}

.raw-pane-banner {
  padding: 8px 12px;
  background: var(--bg-subtle, #f3f4f6);
  border: 1px solid var(--border-default, #e5e7eb);
  border-radius: 6px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--color-ink, #222);
  flex-shrink: 0;
}

[data-theme="dark"] .raw-pane-banner {
  background: #1e262c;
  border-color: #3b4954;
  color: #e5e7eb;
}

.raw-code-box {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
  font-family: var(--font-mono, monospace);
  font-size: 0.85em;
  line-height: 1.5;
  padding: 12px;
  border: 1px solid var(--border-default, #ccc);
  border-radius: 6px;
  box-sizing: border-box;
  background: var(--bg-canvas, #fafafa);
  color: var(--color-ink, #222);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="dark"] .raw-code-box {
  background: #151b20;
  border-color: #3b4954;
  color: #e5e7eb;
}

.raw-pane-compare-diff {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.raw-diff-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.raw-diff-compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-subtle, #f0f0ee);
  border: 1px solid var(--border-default, #ddd);
  border-radius: 8px 8px 0 0;
  margin-bottom: -1px;
}

[data-theme="dark"] .raw-diff-compare-header {
  background: #222c34;
  border-color: #3b4954;
}

.btn-unlink-compare {
  background: none;
  border: 1px solid var(--border-default, #ccc);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--color-ink-muted, #666);
}

.btn-unlink-compare:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.subtab-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   Multi-Release Navigation: Group Titles, Tombstoning & Delta Patches
   (CONCEPT-0045-MULTI-RELEASE-CURATION)
   ========================================================================== */

/* Release-Dropdown: Läufe nach Spezifikationsinhalt (lib_docmodel.release_menu_html,
   _src/tools/page_release_equivalence.py). Eine Linie trennt Releases, deren Inhalt sich
   für die Seite unterscheidet; inhaltsgleiche und nicht erfasste Läufe tragen eine Überschrift. */
nav.crumbs .release-dropdown .releases,
.release-dropdown .releases {
  max-width: calc(100vw - 16px);
}
nav.crumbs .releases .release-run,
.release-dropdown .releases .release-run {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
nav.crumbs .releases > * + .release-run,
nav.crumbs .releases > .release-run + *,
.release-dropdown .releases > * + .release-run,
.release-dropdown .releases > .release-run + * {
  border-top: 1px solid var(--border-default, #e5e7eb);
  margin-top: 3px;
  padding-top: 3px;
}
nav.crumbs .releases .release-run-title,
.release-dropdown .releases .release-run-title {
  padding: 4px 12px 1px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-dim, #6b7280);
}
nav.crumbs .releases .release-run-uncaptured .release-run-title,
nav.crumbs .releases .release-run-absent .release-run-title,
.release-dropdown .releases .release-run-uncaptured .release-run-title,
.release-dropdown .releases .release-run-absent .release-run-title {
  font-style: italic;
  font-weight: 500;
}
[data-theme="dark"] nav.crumbs .releases > * + .release-run,
[data-theme="dark"] nav.crumbs .releases > .release-run + *,
[data-theme="dark"] .release-dropdown .releases > * + .release-run,
[data-theme="dark"] .release-dropdown .releases > .release-run + * {
  border-top-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] nav.crumbs .releases .release-run-title,
[data-theme="dark"] .release-dropdown .releases .release-run-title {
  color: #9ca3af;
}

.ai-tombstone-box {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface, #fff);
  border: 2px solid #eab308;
  border-left: 6px solid #ca8a04;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.1);
}
.ai-tombstone-box h3 {
  margin: 0 0 0.5rem 0;
  color: #a16207;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ai-tombstone-box p {
  margin: 0 0 1rem 0;
  color: var(--color-ink, #374151);
  line-height: 1.5;
}
.ai-tombstone-box .btn-jump-release {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #ca8a04;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.ai-tombstone-box .btn-jump-release:hover {
  background: #a16207;
}
[data-theme="dark"] .ai-tombstone-box {
  background: #1e1e1e;
  border-color: #854d0e;
  border-left-color: #eab308;
}
[data-theme="dark"] .ai-tombstone-box h3 {
  color: #fde047;
}
[data-theme="dark"] .ai-tombstone-box p {
  color: #e5e7eb;
}

.ai-release-delta-box {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-left: 5px solid #2563eb;
  border-radius: 6px;
}
.ai-release-delta-box h4 {
  margin: 0 0 0.4rem 0;
  color: #1e40af;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ai-release-delta-box p {
  margin: 0;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.5;
}
[data-theme="dark"] .ai-release-delta-box {
  background: #172554;
  border-color: #1e40af;
  border-left-color: #60a5fa;
}
[data-theme="dark"] .ai-release-delta-box h4 {
  color: #93c5fd;
}
[data-theme="dark"] .ai-release-delta-box p {
  color: #e2e8f0;
}

.ai-release-fallback-box {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 5px solid #d97706;
  border-radius: 6px;
  color: #92400e;
  font-size: 0.95rem;
  line-height: 1.5;
}
[data-theme="dark"] .ai-release-fallback-box {
  background: #451a03;
  border-color: #78350f;
  border-left-color: #f59e0b;
  color: #fde68a;
}

.ai-superseded-banner {
  margin: 0.75rem 0 1rem 0;
  padding: 0.75rem 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  border-radius: 6px;
  color: #166534;
  font-size: 0.9rem;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ai-superseded-banner strong {
  font-weight: 600;
}
.ai-superseded-meta {
  color: #15803d;
  font-size: 0.85rem;
  margin-left: auto;
}
[data-theme="dark"] .ai-superseded-banner {
  background: #052e16;
  border-color: #14532d;
  border-left-color: #22c55e;
  color: #bbf7d0;
}
[data-theme="dark"] .ai-superseded-meta {
  color: #86efac;
}

.is-tombstoned {
  opacity: 0.3;
  filter: grayscale(80%);
  pointer-events: none;
  user-select: none;
  transition: opacity 0.2s ease;
}

/* Domain Dropdown (Movie 2026-10-05 23-43-56) */
.domain-dropdown {
  position: relative;
  display: inline-block;
}
.domain-dropdown .domain-toggle {
  color: #fff;
  font-size: var(--font-size-nav, 13px);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  min-height: var(--target-min, 32px);
  border-radius: 4px;
  border: none;
  background: transparent;
}
.domain-dropdown .domain-toggle:hover {
  background: rgba(255, 255, 255, .14);
}
.domain-dropdown .domain-toggle::-webkit-details-marker {
  display: none;
}
.domain-dropdown .shell-dropdown-menu {
  left: 0;
  right: auto;
  min-width: 140px;
}
.domain-dropdown .shell-dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  color: var(--color-ink, #1f2937);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
}
.domain-dropdown .shell-dropdown-menu a:hover {
  background: var(--bg-subtle, #f3f4f6);
  color: var(--primary, #0f766e);
}
[data-theme="dark"] .domain-dropdown .shell-dropdown-menu a {
  color: var(--color-ink, #e8eeef);
}
[data-theme="dark"] .domain-dropdown .shell-dropdown-menu a:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

/* Inhaltsgleiche Releases (Lauf „R19-11 – R22-11 · inhaltsgleich“) liegen auf einer
   gemeinsamen, leicht getönten Fläche. */
nav.crumbs .releases .release-equiv-group,
.release-dropdown .releases .release-equiv-group {
  background: rgba(15, 118, 110, 0.06);
  background: color-mix(in srgb, var(--primary, #0f766e) 6%, transparent);
  border-radius: 6px;
  padding-bottom: 2px;
}
[data-theme="dark"] nav.crumbs .releases .release-equiv-group,
[data-theme="dark"] .release-dropdown .releases .release-equiv-group {
  background: rgba(94, 234, 212, 0.07);
}

/* Sub-tab timer: reserve width for 3-digit seconds (measured 38→44px past 100 s) */
.raw-subtab .subtab-timer {
  min-width: 6.6ch;
}


/* ===== Einheitliche Namespace-Übersicht (ns-index, lib_nsindex.py) =====
   Drei Spalten: Gliederung · Karte + Liste · Bezüge. API-Klassifikation über
   die vorhandenen --vis-*-Farben (Rahmen + blasser Hintergrund wie a.dbox). */
main:has(> section.nsx) { max-width: none; }
.nsx {
  --nsx-g1: #b4532a; --nsx-g2: #2a6fb4; --nsx-g3: #6a4fb0; --nsx-g4: #0f7f5a;
  --nsx-g5: #a6761d; --nsx-g6: #b03a6b; --nsx-g7: #3a8a9a; --nsx-g8: #55606a; --nsx-g9: #8a9296;
  display: grid; grid-template-columns: var(--nsx-ol-w, 220px) minmax(0, 1fr) var(--nsx-aside-w, 300px); gap: var(--space-5);
  align-items: start; margin-top: var(--space-4);
}
[data-theme="dark"] .nsx {
  --nsx-g1: #e0875e; --nsx-g2: #6fa8e6; --nsx-g3: #a993e8; --nsx-g4: #45c08f;
  --nsx-g5: #d9a946; --nsx-g6: #e07aa5; --nsx-g7: #6cc3d1; --nsx-g8: #9aa6ae;
}
.nsx [data-g="1"], .nsx[data-g="1"] { --nsx-gc: var(--nsx-g1); }
.nsx [data-g="2"] { --nsx-gc: var(--nsx-g2); } .nsx [data-g="3"] { --nsx-gc: var(--nsx-g3); }
.nsx [data-g="4"] { --nsx-gc: var(--nsx-g4); } .nsx [data-g="5"] { --nsx-gc: var(--nsx-g5); }
.nsx [data-g="6"] { --nsx-gc: var(--nsx-g6); } .nsx [data-g="7"] { --nsx-gc: var(--nsx-g7); }
.nsx [data-g="8"] { --nsx-gc: var(--nsx-g8); } .nsx [data-g="9"] { --nsx-gc: var(--nsx-g9); }
.nsx [data-g="10"] { --nsx-gc: var(--nsx-g1); } .nsx [data-g="11"] { --nsx-gc: var(--nsx-g2); }
.nsx [data-g="12"] { --nsx-gc: var(--nsx-g3); } .nsx [data-g="13"] { --nsx-gc: var(--nsx-g4); }
.nsx [data-g="14"] { --nsx-gc: var(--nsx-g5); } .nsx [data-g="15"] { --nsx-gc: var(--nsx-g6); }
.nsx .kind { background: none; color: inherit; padding: 0; margin: 0; border-radius: 0;
  text-transform: none; letter-spacing: 0; font-size: inherit; vertical-align: baseline; }
.nsx code { font-size: 12.5px; }
.nsx-outline, .nsx-aside { position: sticky; top: calc(var(--nsx-top, 0px) + var(--space-3)); max-height: calc(100vh - var(--nsx-top, 0px) - 2 * var(--space-3));
  overflow: auto; font-size: 13px; }
.nsx-outline { border-inline-end: 1px solid var(--border); padding-inline-end: var(--space-3); }
.nsx-og { margin: var(--space-3) 0 2px; font-weight: 600; cursor: pointer; display: flex; gap: 7px; align-items: center; }
.nsx-og:first-child { margin-top: 0; }
.nsx-og:not([data-g])::before { display: none; }
.nsx-og[data-cnt]::after { content: attr(data-cnt); margin-inline-start: auto; font-weight: 400; color: var(--faint); font-size: 11px; }
.nsx-og::before, .nsx-gt::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--nsx-gc); }
.nsx-og.on { color: var(--primary); }
a.nsx-oi { display: block; font: 12px var(--font-mono); color: var(--muted); padding: 1px 0 1px 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; padding-inline: 16px 4px; }
a.nsx-oi:hover, a.nsx-oi.on { color: var(--primary); }
a.nsx-oi.on { background: var(--surface2); border-radius: 4px; }
.nsx-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); grid-auto-flow: row dense; }
/* Große Gruppen über die ganze Breite; kleine rücken nebeneinander (Aufnahme 12:40) */
.nsx-map > .nsx-card.nsx-card-wide { grid-column: 1 / -1; }
.nsx-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 12px; }
.nsx-card > .nsx-gt { font-size: 14px; margin: 0 0 8px; padding-inline-end: 28px; cursor: pointer; display: flex; gap: 7px; align-items: center; }
.nsx-card > .nsx-cnt { position: absolute; top: 11px; inset-inline-end: 12px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.nsx-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.nsx a.nsx-chip { font: 12px var(--font-mono); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); text-decoration: none; transition: opacity .12s;
  max-width: 100%; overflow-wrap: anywhere; }   /* lange Namen brechen in der Karte um statt sie zu sprengen */
.nsx a.nsx-chip.vis-app { border-color: var(--vis-app); background: var(--vis-app-bg); color: var(--vis-app); }
.nsx a.nsx-chip.vis-priv { border-color: var(--vis-priv); background: var(--vis-priv-bg); color: var(--vis-priv); }
.nsx a.nsx-chip.vis-internal { border-color: var(--vis-internal); background: var(--vis-internal-bg); color: var(--vis-internal); }
.nsx a.nsx-chip.k-function { border-style: dashed; }
.nsx a.nsx-chip.k-enumeration, .nsx a.nsx-chip.k-type-alias, .nsx a.nsx-chip.k-variable { font-style: italic; }
.nsx a.nsx-chip sup { font-size: 9.5px; margin-inline-start: 2px; opacity: .75; }
.nsx-map.dim a.nsx-chip:not(.self):not(.rel) { opacity: .28; }
.nsx a.nsx-chip.self { background: var(--primary); border-color: var(--primary); color: #fff; }
.nsx a.nsx-chip.rel { box-shadow: 0 0 0 2px var(--status-candidate); }
.nsx-sec > .nsx-gt { font-size: 17px; margin: var(--space-5) 0 var(--space-2); display: flex; gap: 8px; align-items: center; }
.nsx-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 4px var(--space-4);
  padding: var(--space-2); border-bottom: 1px solid var(--border); border-radius: 8px; scroll-margin-top: var(--space-4); }
.nsx-row:hover, .nsx-row.focus { background: var(--surface); }
.nsx-nm { overflow-wrap: anywhere; }
.nsx-nm > a { font: 600 13px var(--font-mono); }
.nsx-nm > .kind { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.nsx-nm > .nsx-cnt { font-size: 11px; color: var(--faint); }
.nsx-ds { min-width: 0; }
.nsx-desc { margin: 0; color: var(--muted); font-size: 13.5px; }
.nsx-std { font: 11px var(--font-mono); color: var(--primary); background: var(--surface2); border-radius: 4px; padding: 0 4px; margin-inline-start: 6px; white-space: nowrap; }
.nsx-inh, .nsx-specs { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.nsx-specs code { font-size: 11.5px; }
.nsx-fg { margin-top: 3px; }
.nsx-fg > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; }
.nsx-fg > summary::-webkit-details-marker { display: none; }
.nsx-fg > summary::before { content: "▸"; display: inline-block; width: 12px; color: var(--faint); }
.nsx-fg[open] > summary::before { content: "▾"; }
.nsx-fg > summary .kind { font-weight: 600; color: var(--text); margin-inline-end: 4px; }
.nsx-fg > summary code { color: var(--text); }
.nsx-fg .nsx-cnt { color: var(--faint); }
.nsx-sigs { margin: 4px 0 6px 12px; border-inline-start: 2px solid var(--border); padding-inline-start: 10px; }
.nsx-sig { font-size: 12px; color: var(--muted); padding: 2px 0; overflow-wrap: anywhere; }
.nsx-sig code { font-size: 12px; }
a.nsx-go { font-size: 10.5px; color: var(--faint); margin-inline-start: 4px; white-space: nowrap; }
.nsx-aside { border-inline-start: 1px solid var(--border); padding-inline-start: var(--space-4); }
.nsx-hint { color: var(--muted); margin: 0; }
.nsx-rel .t { font: 600 15px var(--font-mono); overflow-wrap: anywhere; }
.nsx-rel .k { color: var(--faint); font-size: 12px; margin-bottom: var(--space-2); }
.nsx-rel h4 { margin: var(--space-3) 0 4px; font-size: 11px; }
.nsx-rel ul { margin: 0; padding: 0; list-style: none; }
.nsx-rel li { font: 12px var(--font-mono); padding: 1px 0; overflow-wrap: anywhere; }
@media (max-width: 1200px) { .nsx { grid-template-columns: var(--nsx-ol-w, 200px) minmax(0, 1fr); } .nsx-aside { display: none; } }
@media (max-width: 760px) { .nsx { grid-template-columns: minmax(0, 1fr); } .nsx-outline, .nsx-olsplit { display: none; }
  .nsx-row { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .nsx a.nsx-chip { transition: none; } }
.nsx.nsx-small { grid-template-columns: minmax(0, 1fr); }
.nsx.nsx-small .nsx-sec > .nsx-gt:first-child { margin-top: 0; }
.nsx-note { margin: var(--space-2) 0 0; font-size: 12px; color: var(--faint); }
/* ns-index: Pfeile, Vorschau, Vererbung, Release, KI-Kommentar */
.nsx-map { position: relative; }
.nsx-arrows { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 1; }
.nsx-arrows .nsx-edge { fill: none; stroke: var(--text); stroke-width: 1; opacity: .55; }
.nsx-arrows .nsx-ah { fill: var(--text); opacity: .7; }
.nsx-relnote { margin: var(--space-3) 0 0; font-size: 12.5px; color: var(--status-candidate); }
.nsx .nsx-dropped { opacity: .55; text-decoration: line-through; }
.nsx-rel .nsx-dropnote { color: var(--status-rejected); font-size: 12px; margin: 4px 0; }
.nsx-rel .nsx-desc { margin: var(--space-2) 0 0; font-size: 12.5px; }
.nsx-inhwrap { overflow-x: auto; margin: 2px 0 var(--space-2); }
.nsx-inhsvg { display: block; max-width: none; }
.nsx-inhsvg .nsx-inh-node rect { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.nsx-inhsvg .nsx-inh-node.self rect { stroke: var(--primary); stroke-width: 2; }
.nsx-inhsvg .nsx-inh-node.ext rect { fill: var(--surface2); stroke-dasharray: 3 2; }
.nsx-inhsvg .nsx-inh-node text { font: 11px var(--font-mono); fill: var(--text); }
.nsx-inhsvg .nsx-inh-node[data-jump] { cursor: pointer; }
.nsx-inhsvg .nsx-inh-node[data-jump]:hover rect { stroke: var(--primary); }
.nsx-inhsvg .nsx-inh-edge { fill: none; stroke: var(--muted); stroke-width: 1; }
.nsx-inhsvg .nsx-tri { fill: var(--bg); stroke: var(--muted); stroke-width: 1; }
.nsx-detail-view { margin-top: var(--space-2); font-size: 12px; }
.nsx-detail-view pre.syntax { font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 var(--space-2); padding: var(--space-2); background: var(--surface2); border-radius: 4px; }
.nsx-detail-view .desc p { margin: 0 0 var(--space-2); }
.nsx-detail-view table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-2); font-size: 11.5px; }
.nsx-detail-view th, .nsx-detail-view td { text-align: start; vertical-align: top; padding: 2px 4px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.nsx-detail-view th { color: var(--muted); font-weight: 600; width: 38%; }
.nsx-detail-view hr.nsx-sep { border: 0; border-top: 1px dashed var(--border); margin: var(--space-2) 0; }
.nsx-detail-view th { width: 30%; }
.nsx-detail-view td, .nsx-detail-view td code, .nsx-detail-view td .mono { font-size: 11px; }
.nsx-detail-view td.mono, .nsx-detail-view td code { overflow-wrap: anywhere; }
/* ns-index: Gruppierung, Folds, Detailansicht, Inspektorbreite */
.nsx-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: var(--space-3); font-size: 11.5px; color: var(--faint); }
.nsx-by button { font: inherit; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 1px 7px; cursor: pointer; }
.nsx-by button:hover { color: var(--primary); border-color: var(--primary); }
.nsx-by button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.nsx:not(.nsx-live) .nsx-by, .nsx:not(.nsx-live) .nsx-fold[data-fold="detail"], .nsx:not(.nsx-live) .nsx-grip { display: none; }
.nsx.nsx-live .nsx-list { display: none; }
.nsx-oi { position: relative; }
.nsx-oi .nsx-ai { position: absolute; inset-inline-start: 0; top: 2px; width: 13px; height: 13px; color: #7A39BB; cursor: pointer; border-radius: 3px; }
/* KI-Symbol als Maske statt eines SVG je Gliederungseintrag (Farbe = currentColor) */
.nsx-oi .nsx-ai::before { content: ""; display: block; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l1.6 4.2 4.4 1.3-4.4 1.3L8 12.5 6.4 8.3 2 7l4.4-1.3z'/%3E%3Cpath d='M13 11l.6 1.5 1.4.5-1.4.5L13 15l-.6-1.5-1.4-.5 1.4-.5z'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l1.6 4.2 4.4 1.3-4.4 1.3L8 12.5 6.4 8.3 2 7l4.4-1.3z'/%3E%3Cpath d='M13 11l.6 1.5 1.4.5-1.4.5L13 15l-.6-1.5-1.4-.5 1.4-.5z'/%3E%3C/svg%3E") center / 13px 13px no-repeat; }
@media (forced-colors: active) { .nsx-oi .nsx-ai::before { background: CanvasText; } }
/* Review-Bedarf: Markierung am Gliederungseintrag (wie das Symbol der Hinweisleiste) */
a.nsx-oi.nsx-oi-rv { padding-inline-end: 20px; }
.nsx-oi .nsx-rv { position: absolute; inset-inline-end: 3px; top: 2px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--primary); color: #fff; font: 800 9px/13px var(--font-sans, inherit); text-align: center; }
.nsx-oi .nsx-rv::before { content: "!"; }
a.nsx-oi.sel .nsx-rv { background: #fff; color: var(--primary); }
.page-review-links .nsx-rvshow { border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: 999px;
  background: none; color: var(--primary); padding: 3px 9px; font: 650 11px/1.4 inherit; cursor: pointer; }
.page-review-links .nsx-rvshow:hover { border-style: solid; background: color-mix(in srgb, var(--primary) 7%, var(--surface2)); }
.nsx-oi .nsx-ai:hover, .nsx-oi .nsx-ai:focus-visible, .nsx-oi .nsx-ai[aria-pressed="true"] { background: #7A39BB; color: #fff; outline: none; }
a.nsx-oi.sel { color: #fff; background: var(--primary); border-radius: 4px; }
a.nsx-oi.sel .nsx-ai { color: #fff; }
/* KI-Symbole je Ausführlichkeitsstufe (lib_nsindex._ai_icons): aufsteigend nach Umfang, von hell nach dunkel */
.nsx-oi .nsx-ais { position: absolute; inset-inline-start: 0; top: 2px; display: flex; gap: 1px; }
.nsx-oi .nsx-ais .nsx-ai { position: static; flex: none; }
.nsx-oi .nsx-ais:not([data-n="1"]) .nsx-ai { width: 10px; }
.nsx-oi .nsx-ais:not([data-n="1"]) .nsx-ai::before { width: 10px; -webkit-mask-size: 10px 10px; mask-size: 10px 10px; }
.nsx-oi .nsx-ai-l2 { color: var(--ai-lv2); filter: drop-shadow(0 0 .6px var(--ai-lv-edge)); }
.nsx-oi .nsx-ai-l3 { color: var(--ai-lv3); }
.nsx-oi .nsx-ai-l4 { color: var(--ai-lv4); }
.nsx-oi .nsx-ais .nsx-ai:hover, .nsx-oi .nsx-ais .nsx-ai:focus-visible, .nsx-oi .nsx-ais .nsx-ai[aria-pressed="true"] {
  background: color-mix(in srgb, currentColor 22%, transparent); color: inherit; outline: 1px solid var(--ai-lv3); outline-offset: 0; }
.nsx-oi .nsx-ais .nsx-ai-l2:hover, .nsx-oi .nsx-ais .nsx-ai-l2[aria-pressed="true"] { color: var(--ai-lv2); }
.nsx-oi .nsx-ais .nsx-ai-l3:hover, .nsx-oi .nsx-ais .nsx-ai-l3[aria-pressed="true"] { color: var(--ai-lv3); }
.nsx-oi .nsx-ais .nsx-ai-l4:hover, .nsx-oi .nsx-ais .nsx-ai-l4[aria-pressed="true"] { color: var(--ai-lv4); }
a.nsx-oi.sel .nsx-ais .nsx-ai { color: #fff; filter: none; }
a.nsx-oi.sel .nsx-ais .nsx-ai-l2 { opacity: .55; }
a.nsx-oi.sel .nsx-ais .nsx-ai-l3 { opacity: .8; }
.nsx-ol:not([data-by="since"]):has(.nsx-ais[data-n="2"]) a.nsx-oi { padding-inline-start: 24px; }
.nsx-ol:not([data-by="since"]):has(.nsx-ais[data-n="3"]) a.nsx-oi { padding-inline-start: 35px; }
@media (forced-colors: active) { .nsx-oi .nsx-ai-l2 { filter: none; } }
.nsx a.nsx-chip.pin { outline: 2px solid var(--primary); outline-offset: 1px; }
.nsx-folds > details.nsx-fold { margin: 0 0 var(--space-3); }
.nsx-folds > details.nsx-fold > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 30px;
  padding: 3px 0; border-bottom: 1px solid var(--border); }
.nsx-folds > details.nsx-fold[open] > summary { margin-bottom: var(--space-3); }
.nsx-folds > details.nsx-fold > summary > h2.sect { flex: none; margin: 0; padding: 0; border: 0; font-size: 12px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nsx-folds > details.nsx-fold > summary > h2.sect .ai-badge { margin-inline-start: 6px; vertical-align: 1px; }
.nsx-grip { flex: none; align-self: center; width: 12px; height: 20px; cursor: grab; border-radius: 3px; opacity: .45;
  background: radial-gradient(circle, var(--muted) 1.2px, transparent 1.6px) 0 0 / 6px 6px;
  -webkit-user-drag: element !important; user-select: none !important; -webkit-user-select: none !important; touch-action: none; }
.nsx-grip:hover, .nsx-grip:focus-visible { opacity: 1; outline: none; background-color: var(--surface2); }
.nsx-fold.nsx-dragging { opacity: .5; }
/* Detailansicht: Titel des Elements sitzt in der Fold-Zeile, nicht noch einmal im Inhalt */
.nsx-folds > details.nsx-fold[data-fold="detail"] { scroll-margin-top: var(--nsx-top, 0px); }
.nsx-folds > details.nsx-fold[data-fold="detail"] > summary { position: sticky; top: var(--nsx-top, 0px); z-index: 3; background: var(--bg);
  padding-inline-start: 6px; border-inline-start: 3px solid transparent; }
.nsx-fold[data-vis="vis-app"] > summary { border-inline-start-color: var(--vis-app) !important; }
.nsx-fold[data-vis="vis-priv"] > summary { border-inline-start-color: var(--vis-priv) !important; }
.nsx-fold[data-vis="vis-internal"] > summary { border-inline-start-color: var(--vis-internal) !important; }
.nsx-dettitle { flex: 1 1 260px; min-width: 0; font-size: 15px; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.nsx-dettitle:empty { display: none; }
.nsx-dettitle .kind { font-size: 11px; padding: 0 6px; margin-inline-end: 4px; vertical-align: 1px; }
.nsx-dettitle .meta, .nsx-dettitle .sws, .nsx-dettitle .ups { display: inline; margin: 0; font-size: 12px; font-weight: 400; color: var(--muted); }
.nsx-dettitle a:not(.nsx-detname) { pointer-events: none; color: inherit; }
.nsx-canon > h1, .nsx-canon > h1 + p.meta, .nsx-canon > article.rec:only-child > .recname { display: none; }
.nsx-canon > article.rec, .nsx-canon-fns > article.rec { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.nsx-canon > article.rec + article.rec, .nsx-canon-fns > article.rec { border-top: 1px dashed var(--border); padding-top: var(--space-3); margin-top: var(--space-3); }
.nsx-canon-fns > article.rec .recname { font-size: 15px; }
.nsx-canon h2.sect { font-size: 15px; margin: var(--space-4) 0 var(--space-2); padding: 0; border: 0; }
.nsx-canon h3, .nsx-canon-fns > h3 { font-size: 15px; margin: var(--space-4) 0 var(--space-2); }
.nsx-canon > :first-child { margin-top: 0; }
.nsx-detbody .review-request-lead, .nsx-detbody .review-request-bound { display: none; }
.nsx-detbody .review-request-summary { margin: var(--space-2) 0; }
.nsx-detbody > .nsx-hint { margin: var(--space-2) 0; }
.nsx-canon-link { margin-inline-start: auto; font-size: 12.5px; font-weight: 400; white-space: nowrap; }
.nsx-canon.nsx-loading { min-height: 120px; background: linear-gradient(90deg, var(--surface) 0, var(--surface2) 50%, var(--surface) 100%) 0 0 / 200% 100%; border-radius: 8px; animation: nsx-shimmer 1.2s linear infinite; }
@keyframes nsx-shimmer { to { background-position: -200% 0; } }
.nsx-detbody [id], .nsx-detbody .ai { scroll-margin-top: calc(var(--nsx-top, 0px) + 44px); }
.nsx-canon-fns > h3 { display: flex; gap: 8px; align-items: baseline; }
.nsx-canon-fns .nsx-cnt { font-size: 12px; color: var(--faint); font-weight: 400; }
.nsx-aside { position: sticky; height: calc(100vh - var(--nsx-top, 0px) - 2 * var(--space-3)); }
.nsx-split { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 7px; cursor: col-resize; touch-action: none; z-index: 2; }
.nsx-split:hover, .nsx-split:focus-visible, .nsx-resizing .nsx-split { background: var(--primary); opacity: .35; outline: none; }
.nsx-resizing { user-select: none; cursor: col-resize; }
@media (prefers-reduced-motion: reduce) { .nsx-canon.nsx-loading { animation: none; } }
/* Detailansicht reicht mindestens bis zum Fensterende: Navigation landet immer oben am Fenster */
.nsx-live .nsx-folds > details.nsx-fold[data-fold="detail"][open] { min-height: calc(100vh - var(--nsx-top, 0px)); }

/* Titelleiste bleibt oben stehen (deckend über dem Inhalt mit Kategoriefarbe) */
main > h1.nsx-pin {
  position: sticky;
  top: 0;
  z-index: 6;
  margin-top: 0;
  background-color: var(--bg);
  border-bottom: 2px solid var(--border);
}
body.vis-app main > h1.nsx-pin {
  background-color: var(--bg);
  background-image: linear-gradient(var(--vis-app-bg), var(--vis-app-bg));
  border-bottom: 3px solid var(--vis-app);
}
body.vis-app main > h1.nsx-pin:hover {
  background-image: linear-gradient(var(--vis-app-bg-hover), var(--vis-app-bg-hover));
}
body.vis-priv main > h1.nsx-pin {
  background-color: var(--bg);
  background-image: linear-gradient(var(--vis-priv-bg), var(--vis-priv-bg));
  border-bottom: 3px solid var(--vis-priv);
}
body.vis-priv main > h1.nsx-pin:hover {
  background-image: linear-gradient(var(--vis-priv-bg-hover), var(--vis-priv-bg-hover));
}
body.vis-internal main > h1.nsx-pin {
  background-color: var(--bg);
  background-image: linear-gradient(var(--vis-internal-bg), var(--vis-internal-bg));
  border-bottom: 3px solid var(--vis-internal);
}
body.vis-internal main > h1.nsx-pin:hover {
  background-image: linear-gradient(var(--vis-internal-bg-hover), var(--vis-internal-bg-hover));
}

/* Kennzahlen und Knöpfe in den Fold-Zeilen */
.nsx-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 11.5px; color: var(--muted); }
.nsx-st b { color: var(--text); font-weight: 600; }
.nsx-st-rev { padding: 0 6px; border-radius: 4px; border: 1px solid var(--border); }
.nsx-st-unreviewed { color: var(--status-candidate); border-color: currentColor; }
.nsx-hbtn { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 4px;
  background: none; color: var(--muted); cursor: pointer; }
.nsx-hbtn:first-of-type { margin-inline-start: auto; }
.nsx-canon-link:not([hidden]) ~ .nsx-hbtn { margin-inline-start: 0; }
.nsx-hbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nsx-hbtn:hover, .nsx-hbtn:focus-visible { color: var(--primary); border-color: var(--border); background: var(--surface2); outline: none; }
.nsx:not(.nsx-live) .nsx-hbtn { display: none; }

/* Andocken in die Titelleiste: Reiter in der Leiste, Panel darunter */
main > h1.nsx-pin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nsx-tdock { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-inline-start: var(--space-3); }
.nsx-tdock:empty { display: none; }
/* Reiter sehen aus wie die Fold-Zeile in der Mitte (Griff, Pfeil, Titel, Badge, Kennzahlen) */
.nsx-tab { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 30px; padding: 3px 10px 3px 4px;
  font: 400 13px/1.3 var(--font-sans); text-align: start; color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; cursor: pointer; -webkit-user-drag: element; }
.nsx-tab.nsx-tab-dragging { opacity: .45 !important; }
.nsx-tab, .nsx-tab * { -webkit-user-select: none !important; user-select: none !important; }
.nsx-tab * { -webkit-user-drag: none; }
.nsx-tab .nsx-grip { cursor: grab; }
.nsx-tab-h { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nsx-tab-h::before { content: "\25B8"; display: inline-block; width: .85em; margin-right: .25em; color: var(--primary); transition: transform .15s ease; }
.nsx-tab[aria-expanded="true"] .nsx-tab-h::before { transform: rotate(90deg); }
.nsx-tab-h .ai-badge { margin-inline-start: 6px; vertical-align: 1px; }
.nsx-tab:hover .nsx-tab-h, .nsx-tab:focus-visible .nsx-tab-h { color: var(--primary); }
.nsx-tab:hover, .nsx-tab:focus-visible { border-color: var(--primary); outline: none; }
main > h1.nsx-pin.nsx-drop-zone { outline: 2px dashed var(--primary); outline-offset: 2px; }
main > h1.nsx-pin.nsx-drop-over { outline-style: solid; box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 18%, transparent); }
/* Reiter-Andocken: Globale Regeln für alle tdocked Folds unabhängig vom DOM-Elternknoten */
details.nsx-fold.nsx-tdocked { display: none !important; }
details.nsx-fold.nsx-tdocked.nsx-pop { display: block !important; position: fixed !important; z-index: 1000 !important; margin: 0 !important; padding: var(--space-3) 12px 12px !important;
  max-height: calc(100vh - var(--nsx-top, 0px) - 24px) !important; overflow: auto !important; background: var(--bg) !important;
  border: 1px solid var(--primary) !important; border-top: 0 !important; border-start-start-radius: 0 !important; border-start-end-radius: 8px !important; border-end-start-radius: 8px !important; border-end-end-radius: 8px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25) !important; }
/* Oberkante des Panels mit Lücke unter dem Reiter */
details.nsx-fold.nsx-pop::before, section.nsx.nsx-pop::before { content: ""; position: absolute; top: 0; inset-inline-start: calc(var(--nsx-tabx, 0px) + var(--nsx-tabw, 0px) - 1px); inset-inline-end: 0;
  border-top: 1px solid var(--primary); border-start-end-radius: 8px; }
/* Panel ins Fenster gerückt: Oberkante auch links vom Reiter, Ecke gerundet */
details.nsx-fold.nsx-pop.nsx-pop-shift, section.nsx.nsx-live.nsx-pop.nsx-pop-shift { border-start-start-radius: 8px; }
details.nsx-fold.nsx-pop.nsx-pop-shift::after, section.nsx.nsx-pop.nsx-pop-shift::after { content: ""; position: absolute; top: 0; inset-inline-start: 0;
  width: calc(var(--nsx-tabx, 0px) + 1px); border-top: 1px solid var(--primary); border-start-start-radius: 8px; }
/* Im Panel keine zweite Titelzeile: nur der Knopf zurück in die Mitte, oben in der Ecke */
details.nsx-fold.nsx-pop > summary { position: absolute !important; top: 6px !important; inset-inline-end: 8px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
  background: none !important; pointer-events: none !important; }
/* Der Knopf zum Lösen liegt über dem Inhalt des Panels (die Karten der Themenkarte reichen bis in die Ecke) */
details.nsx-fold.nsx-pop > summary { z-index: 2; }
details.nsx-fold.nsx-pop > summary > :not(.nsx-backbtn) { display: none !important; }
details.nsx-fold.nsx-pop > summary > .nsx-backbtn { display: inline-grid !important; pointer-events: auto !important; margin: 0 !important; }
.nsx-tab[aria-expanded="true"] { position: relative; z-index: 1; border-color: var(--primary); border-bottom-color: transparent;
  border-end-start-radius: 0; border-end-end-radius: 0; box-shadow: none; }
.nsx-pop .nsx-grip { display: none !important; }
.nsx-backbtn { display: none; }
.nsx-pop .nsx-backbtn, .nsx-topdock .nsx-backbtn { display: inline-grid; }

/* Aktions-Knöpfe in der Summary der Folds */
.nsx-tabbtn { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-start: auto; padding: 0; border: none; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.nsx-tabbtn:hover { background: var(--surface2); color: var(--primary); }
.nsx-topdock .nsx-tabbtn, .nsx-folds details.nsx-fold > summary .nsx-tabbtn { display: inline-grid; }
.nsx-topdock .nsx-backbtn { margin-inline-start: 4px; }

/* Schutz gegen versehentliche Textmarkierung beim Ziehen/Klicken */
.nsx-grip, .nsx-tab, .nsx-hbtn, details.nsx-fold > summary, details.nsx-fold > summary * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none;
}
.nsx-fold.nsx-dragging, .nsx-fold.nsx-dragging * {
  -webkit-user-select: none !important;
  user-select: none !important;
}
body.nsx-dnd-active, body.nsx-dnd-active * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* Seitenspannende Dropzonen (Themenkarte, Guides, Diagramme, Namespaces) */
.nsx-topdock { display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.nsx-dock-lead { margin-top: 6px; margin-bottom: 8px; }
.nsx-dock-pre { margin-bottom: 8px; }
.nsx-dock-post { margin-top: 8px; }
.nsx-topdock:empty,
.nsx-topdock.nsx-drop-zone:empty { display: none; }
.nsx-topdock.nsx-drop-over:empty { display: flex; position: relative; z-index: 5; min-height: 38px; border: 2px dashed var(--primary); border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 8%, var(--bg)); align-items: center; justify-content: center;
  color: var(--primary); font-size: 13px; font-weight: 600; pointer-events: auto; margin-bottom: 8px; cursor: pointer; }
.nsx-topdock.nsx-drop-over:empty::before { content: "Hier andocken (volle Breite)"; }
.nsx-dock-lead.nsx-drop-over:empty::before { content: "Hier direkt unter der Überschrift ablegen (volle Breite)"; }
.nsx-dock-pre.nsx-drop-over:empty::before { content: "Hier oberhalb der Gliederung ablegen (volle Breite)"; }
.nsx-dock-post.nsx-drop-over:empty::before { content: "Hier unterhalb der Gliederung ablegen (volle Breite)"; }
.nsx-topdock.nsx-drop-zone:not(:empty) { outline: 2px dashed color-mix(in srgb, var(--primary) 40%, transparent); outline-offset: 3px; border-radius: 8px; }
.nsx-topdock.nsx-drop-zone.nsx-drop-over, .nsx-topdock.nsx-drop-over { outline: 2px solid var(--primary) !important; outline-offset: 3px !important;
  background: color-mix(in srgb, var(--primary) 12%, transparent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 18%, transparent); }
.nsx-topdock > details.nsx-fold { width: 100%; box-sizing: border-box; margin: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.nsx-topdock > details.nsx-fold > summary { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--surface); cursor: pointer; border-bottom: 1px solid transparent; }
.nsx-topdock > details.nsx-fold[open] > summary { border-bottom: 1px solid var(--border); }
.nsx-topdock > details.nsx-fold > summary > h2.sect { flex: none; margin: 0; padding: 0; border: 0; font-size: 13px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nsx-topdock > details.nsx-fold > summary > h2.sect .ai-badge { margin-inline-start: 6px; vertical-align: 1px; }
.nsx-topdock > details.nsx-fold > :not(summary) { padding: 10px 14px; background: var(--bg); }
.nsx-topdock > details.nsx-fold .nsx-map { width: 100%; }
.nsx-topdock > details.nsx-fold .umlwrap { border: none; margin: 0; padding: 0; background: transparent; }
.nsx-topdock > details.nsx-fold ul.mlist { margin: 0; }

/* Im Kompaktmodus und in angedockten Folds: KI-Trace-Metadaten stehen oben in der Statistikzeile; die redundante Box im Text entfällt */
.nsx-topdock .ai-trace-badge,
.nsx-folds .ai-trace-badge,
.nsx-pop .ai-trace-badge {
  display: none !important;
}

/* In Folds und Docks: Guide-Box behält ihre typische Hintergrundfarbe und den linken Farbakzent */
.nsx-topdock details.nsx-fold .ai,
.nsx-folds details.nsx-fold .ai,
.nsx-pop .ai {
  margin: 6px 0 10px;
}

/* Überschriften im Guide direkt oben anschließen lassen */
.nsx-topdock details.nsx-fold .ai > section:first-of-type > h3,
.nsx-topdock details.nsx-fold .ai > h3:first-of-type,
.nsx-folds details.nsx-fold .ai > section:first-of-type > h3,
.nsx-folds details.nsx-fold .ai > h3:first-of-type,
.nsx-pop .ai > section:first-of-type > h3,
.nsx-pop .ai > h3:first-of-type {
  margin-top: 2px !important;
}

/* Neuer Button für Dossier und Metadaten in der Statistikzeile */
.nsx-st-dossier {
  cursor: pointer;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--primary);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  line-height: 1.3;
  margin-inline-start: 4px;
  transition: all .15s ease;
}
.nsx-st-dossier:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
/* Hervorhebung beim Überfahren von Verweisen im Inspektor */
.nsx a.nsx-chip.peek, .nsx a.nsx-oi.peek { outline: 2px solid var(--status-candidate); outline-offset: 1px; border-radius: 4px; }

/* Inspektor: Abschnitte */
.nsx-rel .nsx-is h4 { display: flex; gap: 6px; align-items: baseline; }
.nsx-rel .nsx-cnt { font-size: 11px; color: var(--faint); font-weight: 400; letter-spacing: 0; text-transform: none; }
.nsx-rel .nsx-idesc, .nsx-rel .nsx-idesc p { font-size: 12.5px; line-height: 1.45; margin: 4px 0 0; }
.nsx-rel pre.nsx-isig { margin: 0 0 4px; padding: 6px 8px; font-size: 11.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--surface2); border-radius: 4px; }
.nsx-rel code.nsx-isig { display: block; font-size: 11px; line-height: 1.35; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.nsx-rel .nsx-iprops { width: 100%; font-size: 11.5px; border-collapse: collapse; margin: 0; }
.nsx-rel .nsx-iprops th { text-align: start; font-weight: 600; color: var(--muted); padding: 1px 8px 1px 0; vertical-align: top; white-space: nowrap; }
.nsx-rel .nsx-iprops td { padding: 1px 0; overflow-wrap: anywhere; }
.nsx-rel .nsx-iprops td, .nsx-rel .nsx-iprops td code { font-size: 11px; }
.nsx-rel ul.nsx-ilist li { padding: 2px 0; border-top: 1px dotted var(--border); }
.nsx-rel ul.nsx-ilist li:first-child { border-top: 0; }
.nsx-rel ul.nsx-ilist code.sig { font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.nsx-rel ul.nsx-ilist .dim { display: block; font: 11px/1.35 var(--font-sans, inherit); color: var(--faint); }
.nsx-rel ul.nsx-icols { columns: 2 150px; column-gap: 12px; }
.nsx-rel ul.nsx-icols code { overflow-wrap: normal; word-break: keep-all; }
.nsx-rel details.nsx-is > summary { list-style: none; cursor: pointer; }
.nsx-rel details.nsx-is > summary::-webkit-details-marker { display: none; }
.nsx-rel details.nsx-is > summary > h4::before { content: "\25B8"; display: inline-block; width: .9em; color: var(--primary); transition: transform .15s; }
.nsx-rel details.nsx-is[open] > summary > h4::before { transform: rotate(90deg); }
.nsx-rel details.nsx-is > summary:hover > h4 { color: var(--primary); }
.nsx-rel ul.nsx-icols li { border-top: 0; break-inside: avoid; }
.nsx-rel .nsx-ifn .nsx-fname { font-weight: 600; }
.nsx-rel a.nsx-ext { text-decoration-style: dotted; }
.nsx-rel .nsx-pkg { font-size: 11px; color: var(--faint); }
.nsx-rel a[data-jump], .nsx-rel a[data-n] { text-decoration-color: var(--primary); }
.nsx-rel pre, .nsx-rel code, .nsx-rel .nsx-iprops td { direction: ltr; unicode-bidi: isolate; text-align: left; }
.nsx-folds.nsx-empty::before { content: attr(data-empty); display: block; padding: var(--space-4) 0; color: var(--faint); }
/* Hinweis, wenn ein Fold außerhalb der Ablageflächen losgelassen wurde */
.nsx-drophint { position: fixed; z-index: 30; max-width: 320px; padding: 8px 12px; border-radius: 8px; background: var(--text);
  color: var(--bg); font-size: 13px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); pointer-events: none; }
.nsx-drophint[hidden] { display: none; }
/* Während eines Zugs ist die ganze mittlere Spalte Ablagefläche (auch wenn sie leer ist) */
.nsx.nsx-live.nsx-dnd > .nsx-body { min-height: calc(100vh - var(--nsx-top, 0px)); }
.nsx.nsx-live.nsx-dnd > .nsx-body > .nsx-folds { min-height: 120px; outline: 2px dashed color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: 6px; border-radius: 8px; }

/* Titelzeile der Detailansicht: Art-Badge wie im Seitenkopf (API-Farbe), Name als Link */
.nsx-dettitle .kind { display: inline-block; background: var(--primary); color: #fff; border-radius: 5px; padding: 1px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.nsx-fold[data-vis="vis-app"] .nsx-dettitle .kind { background: var(--vis-app); }
.nsx-fold[data-vis="vis-priv"] .nsx-dettitle .kind { background: var(--vis-priv); }
.nsx-fold[data-vis="vis-internal"] .nsx-dettitle .kind { background: var(--vis-internal); }
.nsx-dettitle a.nsx-detname { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.nsx-dettitle a.nsx-detname:hover { color: var(--primary); text-decoration-color: currentColor; }
.nsx-dettitle .sws a { pointer-events: auto; }

/* KI-Text des Elements als Reiter in der Titelzeile der Detailansicht */
.nsx-dtab { flex: none; align-self: stretch; margin: -3px 0; }
.nsx-fold[data-fold="detail"].nsx-dp-open > summary { border-bottom-color: transparent; margin-bottom: 0; }
.nsx-dtab[aria-expanded="true"] { border-color: var(--primary); border-bottom-color: var(--bg); border-end-start-radius: 0; border-end-end-radius: 0;
  margin-bottom: -4px; position: relative; z-index: 1; }
.nsx-detpanel { position: relative; margin: 0 0 var(--space-3); padding: var(--space-3) 12px 12px; border: 1px solid var(--primary); border-top: 0;
  border-radius: 0 0 8px 8px; }
.nsx-detpanel::before, .nsx-detpanel::after { content: ""; position: absolute; top: 0; border-top: 1px solid var(--primary); }
.nsx-detpanel::before { inset-inline-start: -1px; width: calc(var(--nsx-tabx, 0px) + 1px); }
.nsx-detpanel::after { inset-inline-start: calc(var(--nsx-tabx, 0px) + var(--nsx-tabw, 0px) - 1px); inset-inline-end: -1px; }
/* Detailansicht: keine eigene Überschrift (nur für Screenreader); Kopfzeile ohne Umbruch,
   überzählige Kennzahlen des KI-Reiters laufen rechts heraus (waagrecht scrollbar) */
.nsx-fold[data-fold="detail"] > summary > h2.sect { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nsx-folds > details.nsx-fold[data-fold="detail"] > summary { flex-wrap: nowrap; }
.nsx-fold[data-fold="detail"] .nsx-dettitle { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsx-dtab { flex: 1 1 0; min-width: 120px; max-width: max-content; flex-wrap: nowrap; white-space: nowrap; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 24px); mask-image: linear-gradient(to left, transparent 0, #000 24px); }
.nsx-dtab::-webkit-scrollbar { display: none; }
.nsx-dtab .nsx-stats { flex-wrap: nowrap; }
.nsx-dtab .nsx-tab-h, .nsx-dtab .nsx-st { flex: none; }

/* Kurations-Dossier: Elementliste und KI-Diskussion nebeneinander (vorher untereinander,
   weil die Editor-Regel auch den Arbeitsbereich auf flex-direction: column setzte) */
.dossier-view-editor .dossier-workbench-layout { flex-direction: row; }
.dossier-view-editor .dossier-viewer-pane, .dossier-modal.has-chat-open .dossier-viewer-pane { max-height: none; height: 100%; overflow-y: auto; }
.dossier-modal.has-chat-open .dossier-chat-pane { max-height: none; height: 100%; }
/* Suchfeld: nur der eigene Löschknopf, nicht zusätzlich der des Browsers */
.dossier-search-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
/* Fokus der Diskussion: einzelne Elemente und Suchtreffer */
.chat-attached-chips { max-height: 112px; overflow-y: auto; align-items: center; }
.chat-attached-chip { display: inline-flex; align-items: center; gap: 2px; }
.chat-chip-goto { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.chat-chip-goto:hover code { text-decoration: underline; }
.chat-attached-chip.is-hit { border-style: dashed; }
.chat-attached-hits-label { font-size: 11.5px; color: var(--muted); margin-inline: 4px 2px; white-space: nowrap; }
.btn-detach-hit { background: transparent; border: none; font-size: 11px; cursor: pointer; color: #004d40; padding: 0 2px; line-height: 1; }
.btn-detach-hit:hover { color: #d32f2f; }
.chat-attached-chip .chat-chip-sws { font-size: 10px; color: var(--muted); margin-inline-start: 3px; }
/* Überladungen in der Detailansicht: Art, Name und Upstream stehen schon in der Kopfzeile;
   je Record bleibt nur Nummer und SWS-ID */
.nsx-canon { counter-reset: nsx-ov; }
.nsx-canon > article.rec { counter-increment: nsx-ov; }
.nsx-canon > article.rec:not(:only-child) > .recname { font-size: 0; margin: 0 0 6px; }
.nsx-canon > article.rec:not(:only-child) > .recname::before { content: counter(nsx-ov) " · "; font-size: 12px; font-weight: 600; color: var(--muted); }
.nsx-canon > article.rec:not(:only-child) > .recname .sws { font-size: 12px; }
.nsx-canon > article.rec:not(:only-child) > .recname .kind,
.nsx-canon > article.rec:not(:only-child) > .recname .ups { display: none; }

/* Historie: Release der letzten (links) und nächsten (rechts) Änderung je Eintrag */
a.nsx-oi-h { display: flex; align-items: center; gap: 5px; }
a.nsx-oi-h .nsx-oi-n { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nsx-hb { flex: none; font: 600 9.5px/1.5 var(--font-mono); padding: 0 4px; border-radius: 3px; cursor: pointer;
  color: var(--muted); background: var(--surface2); border: 1px solid var(--border); }
.nsx-hb-next { margin-inline-start: auto; color: var(--status-candidate); border-style: dashed; }
.nsx-hb:hover, .nsx-hb:focus-visible { color: #fff; background: var(--primary); border-color: var(--primary); outline: none; }
a.nsx-oi.sel .nsx-hb { color: #fff; border-color: rgba(255,255,255,.6); background: transparent; }
/* Einklappbare Gruppen der Gliederung (Pfeil vor dem Titel, Anzahl bleibt sichtbar) */
.nsx-og > .nsx-chev { flex: none; width: 13px; margin-inline: -3px -4px; color: var(--muted); font-size: 11.5px; line-height: 1;
  text-align: center; cursor: pointer; border-radius: 3px; }
.nsx-og > .nsx-chev::before { content: "▾"; }
.nsx-og[aria-expanded="false"] > .nsx-chev::before { content: "▸"; }
[dir="rtl"] .nsx-og[aria-expanded="false"] > .nsx-chev::before { content: "◂"; }
.nsx-og > .nsx-chev:hover, .nsx-og > .nsx-chev:focus-visible { color: var(--primary); outline: 1px solid var(--primary); outline-offset: 1px; }
.nsx-og[aria-expanded="false"] { opacity: .85; }
/* Clusterseiten: Modulkarten als Zeile über der Überschrift (Kompakt) */
.cards.nsx-clucards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 0 0 var(--space-3); }
.cards.nsx-clucards .card { padding: 8px 11px; border-radius: 8px; }
.cards.nsx-clucards .card h3 { font-size: 13.5px; }
.cards.nsx-clucards .card p { font-size: 12px; margin: 2px 0; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cards.nsx-clucards .card-meta { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.cards.nsx-clucards .card-meta .chip, .cards.nsx-clucards .card-meta .chip code { font-size: 10.5px; margin: 0; padding-block: 0; }
/* Schmal: Karten bleiben eine Zeile, die in sich seitwärts scrollt, statt die Überschrift
   unter vier gestapelte Karten zu schieben */
@media (max-width: 640px) {
  .cards.nsx-clucards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(220px, 78%);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .cards.nsx-clucards .card { scroll-snap-align: start; }
}
.nsx-og.nsx-hg { cursor: pointer; }
.nsx-og.nsx-hg:hover { color: var(--primary); }
.nsx-og.nsx-hg.cur { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.nsx.nsx-relhl a.nsx-oi:not(.relhit), .nsx.nsx-relhl a.nsx-chip:not(.relhit) { opacity: .35; }
.nsx a.nsx-oi.relhit, .nsx a.nsx-chip.relhit { background: color-mix(in srgb, var(--status-candidate) 16%, transparent); border-radius: 4px; }

/* Verweis auf die Klasse selbst: Titelleiste leuchtet kurz auf statt nach oben zu springen */
@keyframes nsx-flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 45%, transparent); } }
main > h1.nsx-pin.nsx-flash { animation: nsx-flash .9s ease 1; }
/* Name des Elements in seiner eigenen Signatur: Link auf die kanonische Sicht */
pre.syntax a.nsx-fnlink { color: var(--primary); font-weight: 700; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); }
/* Classic-Modulseiten: Elemente als eigene Artikel im Modul-Record; im Komfortmodus
   sehen sie aus wie die bisherige flache Folge, die abgeleitete Übersicht entfällt */
article.rec article.nsx-mel { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }

/* Elemente-Bereich: Kopfzeile mit Griff und Andock-Funktion */
.nsx-elements-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 6px;
}
.nsx-elements-head .sect {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text);
  flex: 1;
}
/* Elemente ein-/ausklappen: gelöst über die Kopfzeile (Pfeil), angedockt über den Reiter.
   Gelöst bleiben die Elemente an ihrem Platz auf der Fläche, nie als schwebendes Panel; angedockt
   gehören sie dem Reiter (eingeklappt verborgen, ausgeklappt als Panel unter dem Reiter). */
.nsx-elements-head { cursor: pointer; }
.nsx-elchev { flex: none; width: 14px; text-align: center; color: var(--primary); font-size: 12px; line-height: 1; border-radius: 3px; cursor: pointer; }
.nsx-elchev::before { content: "\25B8"; display: inline-block; transition: transform .15s ease; }
.nsx-elements-head[aria-expanded="true"] .nsx-elchev::before { transform: rotate(90deg); }
[dir="rtl"] .nsx-elements-head[aria-expanded="false"] .nsx-elchev::before { transform: scaleX(-1); }
.nsx-elchev:hover, .nsx-elchev:focus-visible { outline: 1px solid var(--primary); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .nsx-elchev::before { transition: none; } }
section.nsx.nsx-collapsed > :not(.nsx-elements-head) { display: none !important; }
section.nsx.nsx-collapsed > .nsx-elements-head { margin-bottom: 0; }
/* Angedockt: der Reiter ist die Kopfzeile und besitzt die Elemente. Auf der Fläche steht nichts
   davon (kein Doppel von Gliederung, Mitte und Inspektor); im Panel bleibt nur der Knopf zum Lösen. */
section.nsx.nsx-tdocked:not(.nsx-pop) { display: none !important; }
section.nsx.nsx-tdocked > .nsx-elements-head { cursor: default; justify-content: flex-end; padding: 0; border: 0; background: none; margin-bottom: 2px; }
section.nsx.nsx-tdocked > .nsx-elements-head > :not(.nsx-backbtn) { display: none !important; }
section.nsx.nsx-tdocked > .nsx-elements-head > .nsx-backbtn { display: inline-grid; }
html:not([data-density="compact"]) section.nsx-mod, html:not([data-density="compact"]) section.nsx-clu { display: none; }
.nsx-dettitle .nsx-modbadge { margin-inline-start: 8px; padding: 1px 7px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.nsx-modbadge .kind { font-weight: 600; }
/* Clusterseiten: Abzeichen des Teils verweist auf dessen Seite; Teile in Gliederung und Karte */
.nsx-dettitle a.nsx-modbadge { pointer-events: auto; color: var(--muted); text-decoration: none; }
.nsx-dettitle a.nsx-modbadge:hover { color: var(--primary); border-color: var(--primary); }
.nsx-dettitle .nsx-modbadge + .nsx-modbadge { margin-inline-start: 4px; }
@media (max-width: 760px) { .nsx-clu .nsx-fold[data-fold="detail"] .nsx-dettitle { white-space: normal; } }
.nsx a.nsx-part { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.nsx a.nsx-part:hover, .nsx a.nsx-part:focus-visible { color: var(--primary); text-decoration: underline; }
/* KI-Zugang (ai-access.js): Anmeldung, eigene Schlüssel, Modellwahl */
.aia-account-btn{min-height:34px;margin-left:auto;border:1px solid rgba(255,255,255,.24);border-radius:999px;background:rgba(255,255,255,.08);color:#fff;padding:5px 12px 5px 9px;display:inline-flex;align-items:center;gap:7px;font:600 13px/1 inherit;cursor:pointer;white-space:nowrap;transition:background .16s,border-color .16s}
.aia-account-btn:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.4)}
.aia-account-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
.aia-account-btn.is-in{padding:3px 12px 3px 3px}
.aia-account-btn+.feedback-open{margin-left:0}
.aia-avatar{border-radius:50%;flex:0 0 auto;object-fit:cover}
.aia-avatar-i{display:inline-grid;place-items:center;background:#fff;color:var(--primary);font:700 12px/1 inherit}
.aia-dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);box-shadow:0 30px 90px rgba(20,24,28,.28);overflow:auto}
.aia-dialog::backdrop{background:rgba(18,22,26,.45);backdrop-filter:blur(2px)}
.aia-body{position:relative;padding:28px 28px 22px;display:grid;gap:14px;font-size:14px;line-height:1.5}
.aia-body h2{margin:0;font-size:21px;line-height:1.25;letter-spacing:-.01em}
.aia-body h3{margin:0 0 6px;font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.aia-body p{margin:0}
.aia-x{position:absolute;top:12px;right:12px;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:15px;cursor:pointer}
.aia-x:hover{background:var(--surface2);color:var(--text)}
.aia-hero{display:grid;gap:8px;justify-items:center;text-align:center;padding-top:4px}
.aia-hero p{color:var(--muted);max-width:34ch}
.aia-mark{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:color-mix(in srgb,var(--primary) 12%,var(--surface));color:var(--primary)}
.aia-mark svg{width:26px;height:26px}
.aia-mark.aia-mail{font-size:24px}
.aia-benefits{list-style:none;margin:2px 0;padding:12px 14px;display:grid;gap:7px;border-radius:12px;background:var(--surface2);font-size:13px;color:var(--muted)}
.aia-benefits li{padding-left:22px;position:relative}
.aia-benefits li::before{content:"✓";position:absolute;left:0;top:0;color:var(--primary);font-weight:700}
.aia-benefits strong{color:var(--text)}
.aia-google{min-height:44px;width:100%;display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid #747775;border-radius:999px;background:#fff;color:#1f1f1f;font:600 14px/1 Roboto,var(--font-sans);cursor:pointer;transition:box-shadow .16s,background .16s}
.aia-google:hover:not(:disabled){background:#f8fafd;box-shadow:0 1px 3px rgba(60,64,67,.3)}
.aia-google:disabled,.aia-btn:disabled,.aia-row input:disabled{opacity:.5;cursor:not-allowed}
.aia-or{display:flex;align-items:center;gap:10px;color:var(--faint);font-size:12px}
.aia-or::before,.aia-or::after{content:"";flex:1;height:1px;background:var(--border)}
.aia-row{display:flex;gap:8px}
.aia-row input,.aia-input{flex:1;min-width:0;min-height:42px;border:1px solid var(--border);border-radius:10px;background:var(--surface2);color:var(--text);padding:9px 12px;font:400 14px/1.4 inherit}
.aia-input{width:100%}
.aia-row input:focus,.aia-input:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 16%,transparent)}
.aia-btn{min-height:42px;border:1px solid var(--border);border-radius:10px;background:var(--surface2);color:var(--text);padding:8px 14px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font:650 13px/1 inherit;cursor:pointer;white-space:nowrap}
.aia-btn:hover:not(:disabled){border-color:var(--muted)}
.aia-btn-primary{border-color:var(--primary);background:var(--primary);color:#fff}
.aia-btn-primary:hover:not(:disabled){background:var(--primary-hover);border-color:var(--primary-hover)}
.aia-btn-quiet{min-height:34px;border-color:transparent;background:transparent;color:var(--muted)}
.aia-link{border:0;background:none;padding:0;color:var(--primary);font:inherit;font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.aia-fine{color:var(--faint);font-size:12px;text-align:center}
.aia-note{padding:9px 12px;border-radius:10px;background:color-mix(in srgb,var(--status-candidate) 12%,var(--surface));color:var(--text);font-size:13px;text-align:center}
.aia-error{padding:9px 12px;border-radius:10px;background:color-mix(in srgb,var(--status-rejected) 10%,var(--surface));color:var(--status-rejected);font-size:13px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.aia-error .aia-retry{min-height:28px;padding:4px 10px;border-color:currentColor;color:inherit;font-size:12px}
.aia-auth-loading{display:flex;align-items:center;justify-content:center;gap:8px;text-align:center}
.aia-spin{width:14px;height:14px;border:2px solid color-mix(in srgb,currentColor 28%,transparent);border-top-color:currentColor;border-radius:50%;flex:0 0 auto;animation:aia-spin .8s linear infinite}
@keyframes aia-spin{to{transform:rotate(360deg)}}
.aia-other{border:1px solid var(--border);border-radius:10px;padding:10px 12px}
.aia-other summary{cursor:pointer;font-weight:600;color:var(--primary)}
.aia-other p{margin:8px 0;color:var(--muted);font-size:13px}
.aia-lead{color:var(--muted)}
.aia-provs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.aia-prov{display:grid;gap:3px;align-content:start;text-align:left;min-height:58px;padding:10px 12px;border:1.5px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);font:inherit;cursor:pointer;transition:border-color .16s,box-shadow .16s}
.aia-prov:hover{border-color:var(--muted)}
.aia-prov.is-sel{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 14%,transparent)}
.aia-prov strong{font-size:14px}
.aia-tag{font-size:11px;font-weight:650;color:var(--primary)}
.aia-ok{color:var(--status-approved);font-weight:700}
.aia-key{display:grid;gap:8px}
.aia-label{display:flex;justify-content:space-between;gap:8px;font-size:12px;font-weight:650;color:var(--muted)}
.aia-label a{color:var(--primary);font-weight:600}
.aia-check{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px}
.aia-check input{accent-color:var(--primary)}
.aia-status{font-size:13px;padding:8px 10px;border-radius:10px;background:var(--surface2)}
.aia-status.is-ok{color:var(--status-approved)}
.aia-status.is-error{color:var(--status-rejected)}
.aia-status.is-busy{color:var(--primary)}
.aia-status.is-hint{color:var(--text);background:color-mix(in srgb,var(--primary) 10%,var(--surface))}
/* Weiterer OpenAI-kompatibler Endpunkt als Alternative zu den Anbieterkarten */
.aia-ep{display:grid;gap:6px;margin-top:4px;padding-top:10px;border-top:1px dashed var(--border)}
.aia-ep .aia-fine{margin:0}
.aia-ep.is-sel input{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 14%,transparent)}
.aia-sec{display:grid;gap:8px;padding-top:12px;border-top:1px solid var(--border)}
.aia-billing{display:grid;gap:6px;padding:10px 12px;border:1px dashed var(--border);border-radius:8px}
.aia-billing h4{margin:0;font-size:.85rem;font-weight:600}
.aia-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.aia-list li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-radius:10px;background:var(--surface2);font-size:13px}
.aia-me{display:flex;align-items:center;gap:12px;padding-right:36px}
.aia-me>div{display:grid;min-width:0;flex:1}
.aia-me span{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis}
.aia-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-height:28px;padding:4px 10px;border:1px dashed color-mix(in srgb,var(--primary) 45%,var(--border));border-radius:999px;background:color-mix(in srgb,var(--primary) 6%,var(--surface));color:var(--primary);font:600 12px/1.2 inherit;cursor:pointer}
.aia-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aia-chip.is-ready{border-style:solid;background:var(--surface);color:var(--text)}
.aia-chip.is-ready svg{color:var(--primary)}
.chat-pane-access,.discuss-access{padding:6px 12px 0}
.aia-gate{display:grid;gap:10px;justify-items:start;padding:4px 2px}
.aia-gate .aia-mark{width:36px;height:36px;border-radius:11px}
.aia-gate .aia-mark svg{width:19px;height:19px}
.aia-gate p{margin:0;white-space:normal}
.aia-gate .aia-btn{min-height:36px}
.aia-toast{position:fixed;left:50%;bottom:22px;z-index:1200;max-width:min(440px,calc(100vw - 32px));padding:11px 16px;border-radius:12px;background:var(--text);color:var(--surface);font-size:13px;box-shadow:0 12px 32px rgba(20,24,28,.25);opacity:0;transform:translate(-50%,8px);transition:opacity .2s,transform .2s;pointer-events:none}
.aia-toast.is-on{opacity:1;transform:translate(-50%,0)}
.rv-web{display:grid;gap:4px;margin:14px 0 0;padding:12px;border-radius:8px;background:color-mix(in srgb,var(--primary) 6%,var(--surface))}
.rv-web .rv-btn{justify-self:start}
@media(max-width:520px){.aia-body{padding:24px 18px 18px}.aia-provs{grid-template-columns:1fr}.aia-row{flex-direction:column}.aia-account-btn span.aia-hname{display:none}}
@media(prefers-reduced-motion:reduce){.aia-toast{transition:none}.aia-spin{animation:none}}
[data-theme="dark"] .aia-google{background:#131314;border-color:#8e918f;color:#e3e3e3}
[data-theme="dark"] .aia-google:hover:not(:disabled){background:#1f1f20}
.aia-me .aia-avatar-i,.aia-dialog .aia-avatar-i{background:color-mix(in srgb,var(--primary) 14%,var(--surface));color:var(--primary);font-size:16px}
@media(max-width:520px){.aia-account-btn>span:not(.aia-avatar){display:none}.aia-account-btn{padding:5px 8px}}
.aia-hint{margin:0;padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--status-candidate) 10%,var(--surface));color:var(--text);font-size:12px;line-height:1.45}
/* Anbieterkarte: Auswahl plus eigener Link zum Schlüssel */
.aia-prov{cursor:pointer;gap:6px}
.aia-prov-pick{all:unset;display:grid;gap:3px;cursor:pointer;border-radius:6px}
.aia-prov-pick:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.aia-prov:has(.aia-prov-pick:active){transform:translateY(1px)}
.aia-prov-key{justify-self:start;font-size:12px;font-weight:600;color:var(--primary);text-decoration:none}
.aia-prov-key:hover{text-decoration:underline}
.aia-key>.aia-label{margin-top:2px}
.aia-signin{gap:10px}
.aia-signin{border-top:0;padding-top:4px}
/* Tooltip unter der Gemini-Karte: Hinweis zur Datennutzung im kostenlosen Kontingent */
.aia-prov{position:relative}
.aia-tip{position:absolute;left:0;top:calc(100% + 8px);z-index:5;width:max-content;max-width:min(340px,calc(100vw - 80px));padding:9px 11px;border-radius:10px;background:var(--text);color:var(--surface);font-size:12px;font-weight:500;line-height:1.45;box-shadow:0 10px 28px rgba(20,24,28,.25);opacity:0;visibility:hidden;transform:translateY(-2px);transition:opacity .15s,transform .15s,visibility .15s;pointer-events:none}
.aia-tip::before{content:"";position:absolute;left:18px;top:-5px;width:10px;height:10px;background:inherit;transform:rotate(45deg)}
.aia-prov:has(.aia-info:hover) .aia-tip,.aia-prov:has(.aia-info:focus-visible) .aia-tip,
.aia-tipwrap:hover .aia-tip,.aia-tipwrap:focus-within .aia-tip{opacity:1;visibility:visible;transform:none}
.aia-info{cursor:help;font-weight:700}
.aia-info:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:50%}
.aia-tipwrap{position:relative;justify-self:start}
.aia-tipwrap .aia-check{cursor:pointer}
.aia-body>.aia-btn-primary{width:100%}
/* Verwaltung des Projektkontingents */
.aia-reqs li.aia-req{display:grid;gap:8px;align-items:stretch;padding:12px;border-radius:12px}
.aia-req>div span{color:var(--muted);font-size:12px}
.aia-req>p{margin:0;font-size:13px}
/* Verwaltung: als wer man handelt, wer anfragt (eigene Konten markiert) */
.aia-acting{display:grid;gap:4px;margin:0 0 12px;padding:10px 12px;border-radius:12px;border:1px solid color-mix(in srgb,var(--primary) 35%,var(--border));background:color-mix(in srgb,var(--primary) 7%,var(--surface))}
.aia-acting p{margin:0;font-size:13px}
.aia-person .aia-mail{color:var(--text)}
.aia-req>div span.aia-person,.aia-req>div span.aia-person span{font-size:13px}
.aia-who{color:var(--muted);font-size:12px}
.aia-self{display:inline-block;padding:0 6px;border-radius:999px;background:color-mix(in srgb,var(--status-candidate) 18%,var(--surface));color:var(--text);font-size:11px;font-weight:650}
.aia-reqs li.aia-req.is-self{border:1px dashed color-mix(in srgb,var(--status-candidate) 60%,var(--border))}
/* Verwaltung: Backend und Modell je Freigabe nebeneinander, jeweils mit Beschriftung */
.aia-field{display:grid;gap:4px;flex:1;min-width:0}
.aia-field .aia-input{min-height:38px}
.aia-req .aia-row .aia-input{flex:1}
.aia-req .aia-row .aia-btn{flex:1}
.aia-list li.is-expired{opacity:.6}
.aia-badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;display:inline-grid;place-items:center;background:#e5484d;color:#fff;font:700 11px/1 inherit}
.aia-github{background:#24292f;border-color:#24292f;color:#fff}
.aia-github:hover:not(:disabled){background:#32383f;box-shadow:none}
[data-theme="dark"] .aia-github{background:#f0f3f6;border-color:#f0f3f6;color:#1f2328}
.aia-apple{background:#000;border-color:#000;color:#fff}
.aia-apple:hover:not(:disabled){background:#1d1d1f;box-shadow:none}
[data-theme="dark"] .aia-apple{background:#fff;border-color:#fff;color:#000}
/* Gemeinsames KI-Menü: Status-Punkt, Übersicht, Reiter */
.aia-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:0 0 auto;background:#9aa3a8;vertical-align:middle;margin-right:2px}
.aia-dot.is-ok{background:#3fb950;box-shadow:0 0 0 2px rgba(63,185,80,.25)}
.aia-dot.is-warn{background:#d29922}
.aia-dot.is-off{background:rgba(255,255,255,.45)}
.aia-dialog .aia-dot.is-off{background:var(--faint)}
.aia-dtitle{display:flex;align-items:center;gap:10px;padding-right:36px}
.aia-dtitle .aia-mark{width:36px;height:36px;border-radius:11px}
.aia-dtitle .aia-mark svg{width:20px;height:20px}
.aia-status-box{margin:0;padding:10px 12px;border-radius:12px;background:var(--surface2);display:grid;gap:8px;font-size:13px}
.aia-status-box>div{display:grid;grid-template-columns:minmax(120px,38%) 1fr;gap:10px;align-items:start}
.aia-status-box dt{color:var(--muted);font-weight:600}
.aia-status-box dt small,.aia-status-box dd small{font-weight:400;color:var(--faint)}
.aia-status-box dd{margin:0}
.aia-st-off{color:var(--faint)}
.aia-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-top:4px}
.aia-tab{border:0;border-bottom:2px solid transparent;background:none;padding:8px 12px;margin-bottom:-1px;font:600 13px/1 inherit;color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.aia-tab:hover{color:var(--text)}
.aia-tab.is-on{color:var(--primary);border-bottom-color:var(--primary)}
.aia-tab:focus-visible{outline:2px solid var(--primary);outline-offset:-2px;border-radius:6px}
.aia-panel{display:grid;gap:14px}
.aia-h3{margin:0;font-size:15px}
.aia-sec-first{border-top:0;padding-top:0}
@media(max-width:520px){.aia-status-box>div{grid-template-columns:1fr;gap:2px}}
/* Kopfleisten-Knopf zeigt den Zustand der KI-Zugänge: grün alle, gelb manche, rot keiner */
.aia-account-btn.aia-st-ok{background:#1f883d;border-color:#1f883d;color:#fff}
.aia-account-btn.aia-st-partial{background:#9a6700;border-color:#9a6700;color:#fff}
.aia-account-btn.aia-st-none{background:#cf222e;border-color:#cf222e;color:#fff}
.aia-account-btn.aia-st-ok:hover{background:#1a7f37}
.aia-account-btn.aia-st-partial:hover{background:#7d4e00}
.aia-account-btn.aia-st-none:hover{background:#a40e26}
.aia-dot.is-bad{background:#cf222e}
.aia-signed{margin:0;font-size:13px;color:var(--muted)}
/* Statusseite und Popups */
.aia-sub{width:min(480px,calc(100vw - 40px))}
.aia-sub::backdrop{background:rgba(18,22,26,.25)}
.aia-back{position:absolute;top:14px;left:16px;border:0;background:none;color:var(--primary);font:600 13px/1 inherit;cursor:pointer;padding:6px 4px}
.is-sub>.aia-dtitle{margin-top:18px}
.aia-left{text-align:left}
.aia-body h3{display:flex;align-items:center;gap:6px}
.aia-list li small{color:var(--faint);font-size:11px}
/* Symbole im KI-Knopf: Schlüssel, Geschenkbox, Terminal */
.aia-account-btn.aia-st-ok,.aia-account-btn.aia-st-partial,.aia-account-btn.aia-st-none{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.24)}
.aia-ico{position:relative;display:inline-grid;place-items:center;width:24px;height:24px;margin:-4px 0;transform-origin:50% 60%;transition:transform .12s ease-out;z-index:1}
.aia-ico svg{width:24px;height:24px;overflow:visible}
.aia-ico::after{content:"";position:absolute;right:-2px;bottom:-1px;width:9px;height:9px;border-radius:50%;border:1.5px solid #fff;box-shadow:0 0 0 .5px rgba(0,0,0,.25)}
.aia-ico.is-ok::after{background:radial-gradient(circle at 35% 30%,#8ff0a4,#1a7f37)}
.aia-ico.is-warn::after{background:radial-gradient(circle at 35% 30%,#ffe58a,#bf8700)}
.aia-ico.is-bad::after{background:radial-gradient(circle at 35% 30%,#ff9b9b,#cf222e)}
.aia-ico.is-bad svg{filter:saturate(.45) brightness(.95)}
@media(prefers-reduced-motion:reduce){.aia-ico{transition:none}}
/* Diskussionsknöpfe ohne KI-Zugang: ausgegraut, Klick öffnet den KI-Dialog */
.aia-off{opacity:.45;filter:grayscale(1);cursor:pointer}
.discuss-answer-meta,.chat-answer-meta{margin-top:6px;font-size:11px;color:var(--faint);font-style:italic}

/* ------------------------------------- Breadcrumb-Zeile mit Ansicht und Sprache */
.crumbbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; background: var(--surface); border-bottom: 1px solid var(--border); padding-inline-end: 24px; }
.crumbbar nav.crumbs { flex: 1 1 auto; min-width: 0; background: none; border-bottom: 0; }
.crumb-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; padding: 4px 0; }
.crumb-toggle { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface2); color: var(--muted); cursor: pointer; padding: 0; }
.crumb-toggle:hover { color: var(--primary); border-color: var(--primary); }
.crumb-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.crumb-toggle[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.crumb-toggle .ico-sun, [data-theme="dark"] .crumb-toggle .ico-moon { display: none; }
/* Standardansicht wiederherstellen (ns-index.js): ohne Abweichung von der Vorgabe ausgegraut */
.crumb-toggle.nsx-resetbtn.is-off { opacity: .45; cursor: default; }
.crumb-toggle.nsx-resetbtn.is-off:hover { color: var(--muted); border-color: var(--border); }
.nsx-undo { position: fixed; z-index: 1200; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: 13px; }
.nsx-undo[hidden] { display: none; }
.nsx-undo-b { font: inherit; font-weight: 600; padding: 3px 10px; border: 1px solid var(--primary); border-radius: 999px;
  background: transparent; color: var(--primary); cursor: pointer; }
.nsx-undo-b:hover, .nsx-undo-b:focus-visible { background: var(--primary); color: #fff; outline: none; }
[data-theme="dark"] .crumb-toggle .ico-sun { display: block; }
/* Dichteschalter: Symbol der aktuellen Ansicht (Zeilen weit mit Pfeilen nach außen / eng mit Pfeilen nach innen) */
.crumb-toggle .ico-dens-compact, [data-density="compact"] .crumb-toggle .ico-dens-comfortable { display: none; }
[data-density="compact"] .crumb-toggle .ico-dens-compact { display: block; }
.crumb-tools .langs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-inline-start: 6px; }
.crumb-tools .langs a { display: inline-flex; line-height: 0; opacity: .5; border-radius: 2px; }
.crumb-tools .langs a:hover, .crumb-tools .langs a:focus-visible { opacity: 1; }
.crumb-tools .langs a.cur { opacity: 1; outline: 2px solid var(--primary); outline-offset: 1px; }
.crumb-tools .langs img { width: 21px; height: 14px; object-fit: cover; border-radius: 2px; display: block; }
@media (max-width: 720px) { .crumbbar { padding-inline-start: 16px; padding-inline-end: 16px; } .crumbbar nav.crumbs { padding-inline: 0; } }
@media print { .crumb-tools { display: none; } }

/* Suchfeld mit Lupe, ohne eigenen Knopf */
.shell-search { position: relative; }
.shell-search-ico { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .8); pointer-events: none; }
.shell-search input { padding-inline-start: 32px; }
.rv-drawer-tools { display: grid; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.rv-drawer-tools > .rv-btn { justify-self: start; }
.rv-gh-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rv-gh-row strong { color: var(--text); }
.rv-gh-text { flex: 1; min-width: 0; }
.rv-gh-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface2); color: var(--faint); }
.rv-gh-ico.is-on { background: #1f883d; color: #fff; }
@media (min-width: 1280px) { .shell-controls .shell-search input { width: 12rem; } }
/* Suchfeld mittig zwischen Bereichswahl („Explore“) und KI-Knopf (UX-Aufnahme 07.10.2026): eigenes Element der
   Kopfzeile, so breit wie möglich ohne die Nachbarn zu berühren. Ruhend bis 40rem, beim Tippen oder mit Text bis
   zur ganzen freien Breite; nie breiter als der Platz (min-width: 0), deshalb kein Überlauf. Gleich große
   automatische Ränder zentrieren es in der Lücke. Seiten mit der Suche in .shell-controls bleiben wie bisher. */
header.shell .shell-domains { flex: 0 1 auto; }
header.shell > .shell-search { flex: 1 1 0; min-width: 6rem; max-width: 40rem; margin-inline: auto; transition: max-width .18s ease; }
header.shell > .shell-search:focus-within,
header.shell > .shell-search:has(input:not(:placeholder-shown)) { max-width: 100%; }
header.shell > .shell-search input { width: 100%; max-width: none; min-width: 0; }
header.shell > .shell-search ~ .shell-controls { flex: 0 0 auto; margin-inline-start: 0; }
@media (prefers-reduced-motion: reduce) { header.shell > .shell-search { transition: none; } }
/* Schmal: Titel und Bereich in Zeile 1, Suche (volle Breite), KI und Paket in Zeile 2 */
@media (max-width: 767px) {
  header.shell { flex-wrap: wrap; row-gap: 6px; }
  header.shell .titleblock { flex: 1 1 auto; }
  header.shell .shell-domains { flex: 0 0 auto; }
  header.shell .shell-controls { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; }
  header.shell .shell-search { flex: 1 1 auto; min-width: 0; }
  header.shell .shell-search input { width: 100%; }
  header.shell .reviewbar { width: auto; margin: 0; }
  /* Suche als eigenes Element: Zeile 1 Titel + Bereich, Zeile 2 Suche + KI/Paket (sehr schmal: drei Zeilen). */
  header.shell:has(> .shell-search) { display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title domains" "search controls"; column-gap: 8px; align-items: center; }
  header.shell:has(> .shell-search) .titleblock { grid-area: title; }
  header.shell:has(> .shell-search) .shell-domains { grid-area: domains; justify-self: end; }
  header.shell > .shell-search { grid-area: search; max-width: none; margin: 0; }
  header.shell > .shell-search ~ .shell-controls { grid-area: controls; justify-content: flex-end; }
}
@media (max-width: 479px) {
  header.shell:has(> .shell-search) { grid-template-areas: "title domains" "search search" "controls controls"; }
}

/* KI-Dialog: Abschnitte nach Priorität, am Griff verschiebbar (Zeiger oder Pfeiltasten, ai-access.js bindReorder).
   Kein HTML5-Drag-Abbild: der Abschnitt hebt sich deckend ab und folgt dem Zeiger, eine schmale Linie zeigt das Ziel. */
.aia-prio-hint { margin: -4px 0 0; }
.aia-sechead { display: flex; align-items: center; gap: 8px; }
.aia-sechead h3 { flex: 1; margin: 0; }
.aia-rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font: 700 11px/1 inherit; }
.aia-rank::before { content: attr(data-aia-prio-n); }
/* Geriffelter Griff wie .nsx-grip (Punktraster), als Knopf fokussierbar */
.aia-grip { flex: none; align-self: center; width: 12px; height: 20px; margin: 0 -2px 0 -4px; padding: 0; border: 0; border-radius: 3px;
  cursor: grab; opacity: .55; touch-action: none; -webkit-user-select: none; user-select: none;
  background: radial-gradient(circle, var(--muted) 1.2px, transparent 1.6px) 0 0 / 6px 6px; }
.aia-grip:hover, .aia-grip:focus-visible { opacity: 1; background-color: var(--surface2); }
.aia-grip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.aia-prio.is-source { border-radius: 10px; background: var(--surface2); box-shadow: 0 0 0 6px var(--surface2); }
.aia-drag-chip { position: fixed; z-index: 10; display: flex; align-items: center; gap: 8px; max-width: min(380px, 80vw);
  padding: 6px 14px 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .12); pointer-events: none;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.aia-drag-chip .aia-grip { margin: 0; opacity: 1; }
.aia-drag-title { overflow: hidden; text-overflow: ellipsis; }
[data-theme="dark"] .aia-drag-chip { box-shadow: 0 10px 28px rgba(0, 0, 0, .55); }
.aia-sorting, .aia-sorting * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.aia-drop-line { position: absolute; left: 22px; right: 22px; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--primary); pointer-events: none; z-index: 4; }
.aia-now { flex: none; padding: 1px 8px; border-radius: 999px; font: 600 11px/1.6 inherit; color: #1a7f37; background: rgba(31, 136, 61, .12); }
[data-theme="dark"] .aia-now { color: #7ee2a0; background: rgba(46, 160, 67, .2); }
.aia-modelrow { display: grid; gap: 4px; }
.aia-modelrow .aia-label { margin: 0; }
/* Lokale CLIs: eine aktiv (Auswahlknopf), Zustand rechts; Ausweich-CLIs darunter in Reihenfolge */
.aia-clis li.aia-cli { padding: 0 10px 0 0; }
.aia-cli-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 6px 0 6px 10px; cursor: pointer; }
.aia-cli-pick input { margin: 0; accent-color: var(--primary); }
.aia-cli-text { min-width: 0; overflow-wrap: anywhere; }
.aia-cli.is-active { box-shadow: inset 0 0 0 1px var(--primary); }
.aia-cli-st { flex: none; font-size: 11px; color: var(--muted); }
.aia-cli-st.is-bad { color: #cf222e; }
.aia-cli-st.is-warn { color: #9a6700; }
[data-theme="dark"] .aia-cli-st.is-bad { color: #ff8182; }
[data-theme="dark"] .aia-cli-st.is-warn { color: #e3b341; }
.aia-fb { display: grid; gap: 4px; }
.aia-fb .aia-label { margin: 0; font-size: 12px; }
.aia-fb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aia-fb-sel { flex: 1 1 8rem; min-width: 0; width: auto; }
.aia-fb-arrow { color: var(--faint); }
.aia-checkrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.aia-sec .aia-signed { padding-top: 2px; }
/* Verwaltung: eigener Knopf neben dem KI-Knopf */
.aia-admin-btn { min-height: 34px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; padding: 5px 12px 5px 10px; display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 inherit; cursor: pointer; white-space: nowrap; }
.aia-admin-btn:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }
.aia-admin-btn[hidden] { display: none; }
@media (max-width: 520px) { .aia-admin-btn > span:not(.aia-badge) { display: none; } .aia-admin-btn { padding: 5px 8px; } }
/* Altes KI-Status-Widget aus review_request.js: ersetzt durch den KI-Knopf (ai-access.js).
   review_request.js bleibt byte-gleich, weil der Kurations-Export es pinnt. */
.shell-controls [data-ai-model-widget] { display: none !important; }

/* --- Implementer's Guides (CONCEPT-0059): Bernstein statt KI-Violett --- */
:root {
  --impl-accent: #9a5b00;
  --impl-accent-fg: #ffffff;
  --impl-tint: #fff4dc;
  --impl-border: #e2b25a;
}
[data-theme="dark"] {
  --impl-accent: #f0b04a;
  --impl-accent-fg: #1c1400;
  --impl-tint: #2b2210;
  --impl-border: #8a6420;
}
.ai.impl-guide {
  background: color-mix(in srgb, var(--impl-accent) 6%, var(--surface, var(--bg-surface)));
  border-color: var(--impl-border);
  border-left-color: var(--impl-accent);
}
.ai.impl-guide .ai-trace-badge .ai-badge-label { background: #7A39BB; }
.ai-impl-badge {
  display: inline-block; background: var(--impl-accent); color: var(--impl-accent-fg);
  border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .4px;
  padding: 2px 10px; text-transform: uppercase;
}
details.impl-fold > summary .ai-badge { margin-left: 10px; }
details.impl-fold > summary h2.sect { color: var(--impl-accent); }
.impl-guide ol.impl-checks li { margin: 4px 0; }
.impl-guide-pending {
  margin: 6px 0 2px; font-size: 12px; color: var(--color-ink-muted, #566269); font-style: italic;
}
/* Reiter User Guide / Implementer's Guide am Element */
.guide-tablist { display: flex; gap: 4px; margin: 10px 0 0; border-bottom: 1px solid var(--border-default); }
.guide-tab {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 6px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0;
  background: transparent; color: var(--color-ink-muted, #566269);
}
.guide-tab[aria-selected="true"] { background: var(--bg-surface); border-color: var(--border-default); color: var(--color-ink); margin-bottom: -1px; }
.guide-tab-impl[aria-selected="true"] { border-top: 3px solid var(--impl-accent); }
.guide-tab-user[aria-selected="true"] { border-top: 3px solid #7A39BB; }
.guide-tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.guide-panel[hidden] { display: none; }
.rv-chip.is-impl { background: var(--impl-accent); color: var(--impl-accent-fg); }
/* Kompaktansicht: angedockter Guide-Block mit nur einer Art braucht keinen Reiter (Titel nennt die Art) */
.nsx-detpanel .guide-tablist:has(> [role="tab"]:only-child) { display: none; }

/* Ausführlichkeitsstufen der User Guides (guide-levels, ai-levels@1; fold.js bindGuideLevels):
   1 Einzeiler, 2 Kurzfassung, 3 Überblick, 4 Ausführlich. Sichtbar ist die Stufe in data-ai-level-cur. */
.ai[data-ai-levels] > .ai-level { display: none; }
.ai[data-ai-levels][data-ai-level-cur="2"] > .ai-level[data-ai-level="2"],
.ai[data-ai-levels][data-ai-level-cur="3"] > .ai-level[data-ai-level="3"],
.ai[data-ai-levels][data-ai-level-cur="4"] > .ai-level[data-ai-level="4"] { display: block; }
/* Einzeiler als Leitsatz, wo kein Kopf ihn zeigt (eingebettete Element-Guides) */
.ai[data-ai-levels] > .ai-level[data-ai-level="1"] { display: block; margin: 4px 0 6px; font-weight: 600; color: var(--text); }
details.fold .ai[data-ai-levels] > .ai-level[data-ai-level="1"],
.nsx-detpanel .ai[data-ai-levels] > .ai-level[data-ai-level="1"] { display: none; }
/* Stufen-Badges: ein Knopf (Klick/Enter/Leertaste = nächste Stufe mit Umlauf, Klick auf ein anderes Badge
   springt dorthin); nur bei mindestens zwei gezeigten Stufen vorhanden */
.ai-level-nav { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; align-items: stretch; margin: 8px 0 10px; padding: 0;
  font: inherit; font-size: 12.5px; line-height: 1.2; border: 1px solid var(--border-default, var(--border)); border-radius: 999px;
  overflow: hidden; background: transparent; color: var(--muted); cursor: pointer; }
.ai-level-go { padding: 4px 11px; }
.ai-level-go + .ai-level-go { border-inline-start: 1px solid var(--border-default, var(--border)); }
.ai-level-nav:hover { border-color: var(--primary); }
.ai-level-go:hover { color: var(--primary); }
.ai-level-go.is-current { background: var(--primary); color: #fff; font-weight: 600; }
.ai-level-step { font: inherit; font-weight: 600; padding: 4px 11px; border: 1px solid var(--primary); border-radius: 999px;
  background: transparent; color: var(--primary); cursor: pointer; }
.ai-level-step:hover { background: var(--primary); color: #fff; }
.ai-level-nav:focus-visible, .ai-level-step:focus-visible { outline: 2px solid var(--color-focus, var(--primary)); outline-offset: 2px; }
.ai-level-more-inline { margin: 10px 0 0; font-size: 12.5px; }
/* Kompaktansicht: „mehr ›“ als schlichter Textlink am Ende des Texts (fold.js hängt ihn an den letzten
   Absatz der Stufe), ohne eigene Zeile und ohne Knopfrahmen */
[data-density="compact"] .ai-level-step.ai-level-more { display: inline; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; font: inherit; font-weight: inherit; color: var(--primary); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
[data-density="compact"] .ai-level-step.ai-level-more:hover { background: none; color: var(--primary-hover); }
[data-density="compact"] .ai-level-more-inline { margin: 0; font-size: inherit; }
/* Letztes Wort und „mehr ›“ brechen nur gemeinsam um (fold.js inlineMoreLinks) */
[data-density="compact"] .ai-more-tail { white-space: nowrap; }
/* Einzeiler im Kopf eines Guide-Folds bzw. Reiters (auch eingeklappt) */
summary .ai-oneliner { display: block; margin: 2px 0 0 1.35em; font-size: 13px; font-weight: 400; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: normal; }
.nsx-folds > details.nsx-fold > summary > .ai-oneliner,
.nsx-tab .ai-oneliner { flex: 1 1 12em; min-width: 0; margin: 0; font-size: 12.5px; }
/* Reiter bleiben schmal genug, damit das Panel an der Gliederung ausgerichtet bleibt (placePop) */
.nsx-tab .ai-oneliner { display: block; max-width: 14em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Aufgeklappter Reiter: das Panel zeigt den Guide, der Einzeiler im Reiter entfällt (sonst wird die Reiterzeile
   breiter, bricht um, und das Panel unter dem Reiter verdeckt die nächste Reiterzeile) */
.nsx-tab[aria-expanded="true"] .ai-oneliner { display: none; }
/* Titelleiste: der Einzeiler trägt nichts zur Eigenbreite des Reiters bei (contain: inline-size), damit die
   Reiterzeile nicht umbricht (Ablagezonen und Panel hängen an ihrer Höhe); der Reiter wächst stattdessen in
   den freien Platz der Zeile und zeigt dort so viel vom Einzeiler, wie passt. */
.nsx-tdock .nsx-tab:has(> .ai-oneliner) { flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; }
.nsx-tdock .nsx-tab > .ai-oneliner { contain: inline-size; flex: 1 1 14em; min-width: 0; max-width: 28em; }
.nsx-tdock .nsx-tab:has(> .ai-oneliner) > .nsx-stats { flex: 0 50 auto; min-width: 0; overflow: hidden; }
.nsx-tdock .nsx-tab:has(> .ai-oneliner) > .nsx-tab-h { flex: none; white-space: nowrap; }
/* Detail-Reiter eines Elements (Kompaktansicht): Einzeiler vor den Kennzahlen sichtbar halten */
.nsx-dtab:has(.ai-oneliner) { min-width: min(28em, 50%); }
.nsx-dtab .ai-oneliner { flex: 0 0 auto; max-width: 18em; }
@media print {
  .ai[data-ai-levels] > .ai-level { display: none !important; }
  .ai[data-ai-levels] > .ai-level[data-ai-level="4"] { display: block !important; }
  .ai-level-nav, .ai-level-more-inline { display: none !important; }
}

/* Dossier: seit der Generierung zugeordnete Belege (lib_current_context.py, fold.js hydrateCurrentContext) */
.dossier-stale-banner { margin: 8px 0 12px; padding: 10px 12px; border: 1px solid #f59e0b; border-left-width: 4px; border-radius: 6px; background: #fffbeb; color: #78350f; font-size: 0.9em; line-height: 1.45; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dossier-stale-banner .curation-btn { margin: 0; }
.chip-new { display: inline-block; padding: 1px 6px; border-radius: 999px; background: #fde68a; color: #78350f; font-size: 0.72em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.is-current-new .current-excerpt { margin: 0 0 8px; padding: 8px 12px; background: #faf9f5; border-left: 3px solid #f59e0b; font-family: Georgia, serif; font-size: 0.95em; line-height: 1.45; }
.is-current-new .current-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 0.78em; color: #666; }
[data-theme="dark"] .dossier-stale-banner { background: #3a2a07; color: #fde68a; border-color: #b45309; }
[data-theme="dark"] .chip-new { background: #92400e; color: #fef3c7; }
[data-theme="dark"] .is-current-new .current-excerpt { background: #1f2430; }
.dossier-meta-grid .dossier-stale-banner { grid-column: 1 / -1; margin: 0; }
.dossier-meta-sub { color: #666; }

/* ---------------------------------------------------------------- Feedback melden (review_request.js)
   Kompakter Dialog: Art als Auswahl, ein Textfeld, Bezug als entfernbare Chips, Kontakt nur auf Wunsch. */
.fb-card{width:min(520px,100%)}
.fb-body{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 18px 16px}
.fb-body>*{min-width:0}
.fb-card .rv-modal-head .rv-icon-btn{color:inherit;font-size:22px;line-height:1}
.fb-card .rv-modal-head .rv-icon-btn:hover{background:rgba(255,255,255,.14);color:inherit}
.fb-lead{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.fb-notice{margin:0;padding:8px 10px;border:1px solid color-mix(in srgb,var(--status-candidate) 45%,var(--border));border-radius:6px;background:color-mix(in srgb,var(--status-candidate) 9%,var(--surface));color:var(--text);font-size:13px}
.fb-seg{display:inline-flex;justify-self:start;border:1px solid var(--border);border-radius:999px;padding:2px;background:var(--surface2);gap:2px}
.fb-seg button{min-height:30px;padding:4px 12px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-family:inherit;font-size:13px;font-weight:600;line-height:1;cursor:pointer}
.fb-seg button[aria-checked="true"]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(25,23,19,.14)}
.fb-seg button:focus-visible,.fb-chip-x:focus-visible,.fb-link:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.fb-label{color:var(--text);font-size:13px;font-weight:650}
.fb-text,.fb-input{width:100%;max-width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:6px;background:var(--surface2);color:var(--text);padding:9px 11px;font-family:inherit;font-size:14px;font-weight:400;line-height:1.45}
.fb-text{min-height:96px;resize:vertical}
.fb-text:focus,.fb-input:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 14%,transparent)}
.fb-err{margin:0;color:var(--status-rejected);font-size:13px}
.fb-ctx{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
.fb-ctx[hidden]{display:none}
.fb-ctx-label{color:var(--muted);font-size:12px;font-weight:650}
.fb-chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.fb-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-width:0;box-sizing:border-box;min-height:28px;padding:2px 2px 2px 9px;border:1px solid var(--border);border-radius:999px;background:var(--surface);font-size:12px;color:var(--text)}
.fb-chip-k{color:var(--muted);font-weight:650;white-space:nowrap}
.fb-chip-v{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fb-chip-x{flex:0 0 auto;width:24px;height:24px;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:15px;line-height:1;cursor:pointer}
.fb-chip-x:hover{background:var(--surface2);color:var(--text)}
.fb-link{border:0;padding:0;background:none;color:var(--primary);font-family:inherit;font-size:13px;font-weight:600;line-height:1.4;cursor:pointer;text-decoration:underline;text-underline-offset:2px;justify-self:start}
.fb-who{margin:0;color:var(--text);font-size:13px;line-height:1.5}
.fb-fine{color:var(--muted);font-size:12px}
.fb-check{display:inline-flex;align-items:center;gap:8px;color:var(--text);font-size:13px;cursor:pointer}
.fb-check input{accent-color:var(--primary);width:16px;height:16px}
.fb-reply{display:grid;gap:6px}
.fb-reply[hidden]{display:none}
.fb-privacy{border-top:1px solid var(--border);padding-top:8px;font-size:12px;color:var(--muted)}
.fb-privacy summary{cursor:pointer;font-weight:650;color:var(--muted)}
.fb-privacy ul{margin:6px 0 0;padding-left:18px;display:grid;gap:4px}
.fb-done{justify-items:center;text-align:center;padding:26px 20px}
.fb-done:focus{outline:0}
.fb-done-mark{margin:0;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:color-mix(in srgb,var(--status-approved) 14%,var(--surface));color:var(--status-approved);font-size:22px;font-weight:700;line-height:1}
.fb-done-title{margin:0;font-size:17px}
.fb-done p{margin:0;max-width:44ch;color:var(--muted);font-size:14px}
.fb-foot{flex-wrap:wrap;position:sticky;bottom:0;z-index:1}
@media(max-width:520px){
  .fb-body{padding:12px 14px}
  .fb-foot .rv-spacer{flex-basis:100%;height:0;order:1}
  .fb-foot .rv-btn{flex:1 1 auto;order:2}
  .fb-foot .rv-btn-quiet{order:3;flex-basis:100%}
}

/* ---------------------------------------------------------------- Panel „Feedback & Kuration“ (review.js) */
.rv-drawer-body{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:18px}
/* Kopf des Panels ist ein <header> und damit petrolfarben (header-Regel oben): Untertitel und Schließen hell. */
.rv-drawer-head .rv-drawer-sub{color:rgba(255,255,255,.86)}
.rv-drawer-head .rv-icon-btn{color:rgba(255,255,255,.9)}
.rv-drawer-head .rv-icon-btn:hover{background:rgba(255,255,255,.14);color:#fff}
.rv-fb-mine .rv-empty-hint{max-width:none;margin:0 0 6px;text-align:left}
.rv-sec{display:grid;gap:10px}
.rv-sec+.rv-sec{border-top:1px solid var(--border);padding-top:16px}
.rv-sec-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.rv-sec-head h3{margin:0;font-size:16px;display:inline-flex;align-items:center;gap:8px}
.rv-sec-lead{margin:0;color:var(--muted);font-size:13px}
.rv-sub-h{margin:4px 0 0;font-size:13px;color:var(--muted);font-weight:700;letter-spacing:.01em}
.rv-sub-h:focus{outline:0}
.rv-count{min-width:22px;height:22px;padding:0 7px;border-radius:11px;display:inline-grid;place-items:center;background:var(--surface2);color:var(--text);font-size:12px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.rv-count.is-new{background:#e5484d;color:#fff}
.rv-fb-admin{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px dashed color-mix(in srgb,var(--primary) 45%,var(--border));border-radius:7px;background:color-mix(in srgb,var(--primary) 5%,var(--surface));font-size:13px}
.rv-fb-admin[hidden]{display:none}
.rv-fb-item .rv-item-head{flex-wrap:wrap}
.rv-fb-when{margin:0 auto 0 0}
.rv-fb-st.is-neu{background:var(--surface);color:var(--muted);border:1px solid var(--border)}
.rv-fb-st.is-in_pruefung{background:color-mix(in srgb,var(--status-trace) 14%,var(--surface));color:var(--status-trace)}
.rv-fb-st.is-erledigt{background:#e4f1e8;color:#29623b}
.rv-fb-st.is-verworfen{background:#f8e8ea;color:#842d39}
.rv-fb-art{background:var(--surface);border:1px solid var(--border);color:var(--text)}
.rv-fb-note{margin:8px 0 0;padding:8px 10px;border-left:3px solid var(--primary);background:var(--surface);font-size:13px}
.rv-btn-sm{min-height:28px;padding:4px 8px;font-size:12px}
.rv-link{border:0;padding:0;background:none;color:var(--primary);font-family:inherit;font-size:13px;font-weight:600;line-height:1.4;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.rv-empty-sm{min-height:0;padding:14px 8px;border:1px dashed var(--border);border-radius:7px}
.rv-empty-sm>svg{width:24px;height:24px;margin-bottom:6px}
.rv-pkg-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.reviewbar-package .review-count.is-feedback{background:#e5484d;color:#fff}
[data-theme="dark"] .rv-fb-st.is-erledigt{background:rgba(34,197,94,.15);color:#86efac}
[data-theme="dark"] .rv-fb-st.is-verworfen{background:rgba(239,68,68,.15);color:#fca5a5}
@media(max-width:520px){
  .rv-pkg-actions .rv-spacer{display:none}
  .rv-pkg-actions .rv-btn{flex:1 1 auto}
  .rv-fb-admin{flex-wrap:wrap}
}

/* ---------------------------------------------------------------- Verwaltung: Feedback sichten (ai-access.js) */
.aia-fb-entry{margin:0 0 6px}
.aia-fbs li.aia-fb{display:grid;gap:6px;align-items:stretch;padding:12px;border-radius:12px}
.aia-fb-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.aia-fb-art,.aia-fb-st{border-radius:999px;padding:2px 8px;font-size:11px;font-weight:700;background:var(--surface);border:1px solid var(--border)}
.aia-fb-art.is-fehler{border-color:color-mix(in srgb,var(--status-rejected) 50%,var(--border));color:var(--status-rejected)}
.aia-fb-art.is-wunsch{border-color:color-mix(in srgb,var(--status-trace) 50%,var(--border));color:var(--status-trace)}
.aia-fb.is-erledigt,.aia-fb.is-verworfen{opacity:.75}
.aia-fb-text{margin:0;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.aia-fb-ctx{margin:0;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.aia-fb-sel{font-style:italic}
.aia-fb-form .aia-row{flex-wrap:wrap}
.aia-fb-note{flex:1 1 220px}
.aia-fb-filter{margin-bottom:8px}

/* ---- Volltextsuche der Kopfzeile (static/site-search.js) */
.site-search-panel {
  position: fixed; z-index: 1200; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-surface); color: var(--color-ink);
  border: 1px solid var(--border-default); border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: 6px 0 4px;
  font-size: .92rem; line-height: 1.4;
}
.site-search-panel[hidden] { display: none; }
.site-search-panel .ss-head {
  position: sticky; top: -6px; z-index: 1; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 6px; padding: 6px 12px 8px; background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
}
.site-search-panel .ss-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.site-search-panel .ss-match { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-inline-start: auto; }
.site-search-panel .ss-match button { min-height: 28px; padding: 3px 8px; border: 1px solid var(--border-default);
  border-radius: 999px; background: var(--bg-surface); color: var(--color-ink-muted); font: inherit; font-size: .75rem; cursor: pointer; }
.site-search-panel .ss-match button[aria-pressed="true"] { border-color: var(--color-teal-600); background: color-mix(in srgb, var(--color-teal-600) 12%, var(--bg-surface)); color: var(--color-ink); }
.site-search-panel .ss-match button:disabled { cursor: default; opacity: 1; }
[data-theme="dark"] .site-search-panel .ss-match button[aria-pressed="true"] { background: #134e4a; color: #ccfbf1; }
.site-search-panel .ss-tab {
  border: 1px solid var(--border-default); background: var(--bg-subtle); color: var(--color-ink);
  border-radius: 999px; padding: 2px 10px; font: inherit; font-size: .82rem; cursor: pointer; min-height: 28px;
}
.site-search-panel .ss-tab.is-active { background: var(--color-teal-600); border-color: var(--color-teal-600); color: #fff; }
.site-search-panel .ss-count { opacity: .75; font-variant-numeric: tabular-nums; }
.site-search-panel .ss-total { color: var(--color-ink-muted); font-size: .8rem; }
.site-search-panel .ss-list { display: flex; flex-direction: column; }
.site-search-panel .ss-hit {
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 2px; padding: 8px 12px;
  color: inherit; text-decoration: none; border-bottom: 1px solid var(--bg-subtle);
}
.site-search-panel .ss-hit:hover, .site-search-panel .ss-hit.is-active { background: var(--bg-subtle); }
.site-search-panel .ss-hit:focus-visible { outline: 2px solid var(--color-teal-600); outline-offset: -2px; }
.site-search-panel .ss-type {
  grid-row: 1; align-self: start; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 2px 6px; border-radius: 4px; background: var(--bg-subtle); color: var(--color-ink-muted); white-space: nowrap;
}
.site-search-panel .ss-page .ss-type { background: #e0f2fe; color: #075985; }
.site-search-panel .ss-ai .ss-type { background: #f3e8ff; color: #6b21a8; }
.site-search-panel .ss-rec .ss-type { background: #ecfdf5; color: #065f46; }
[data-theme="dark"] .site-search-panel .ss-page .ss-type { background: #0c4a6e; color: #e0f2fe; }
[data-theme="dark"] .site-search-panel .ss-ai .ss-type { background: #4c1d95; color: #f3e8ff; }
[data-theme="dark"] .site-search-panel .ss-rec .ss-type { background: #064e3b; color: #d1fae5; }
.site-search-panel .ss-title { grid-row: 1; grid-column: 2; font-weight: 600; overflow-wrap: anywhere; }
.site-search-panel .ss-sub, .site-search-panel .ss-text { grid-column: 2; overflow-wrap: anywhere; }
.site-search-panel .ss-sub { color: var(--color-ink-muted); font-size: .8rem; }
.site-search-panel .ss-text { color: var(--color-ink-muted); font-size: .84rem; }
.site-search-panel mark { background: #fde68a; color: inherit; border-radius: 2px; padding: 0 1px; }
[data-theme="dark"] .site-search-panel mark { background: #854d0e; color: #fff; }
.site-search-panel .ss-msg { margin: 8px 12px; color: var(--color-ink-muted); }
.site-search-panel .ss-err { color: #b91c1c; }
.site-search-panel .ss-more {
  display: block; margin: 8px auto 4px; padding: 4px 14px; border: 1px solid var(--border-default);
  border-radius: 6px; background: var(--bg-surface); color: var(--color-ink); font: inherit; cursor: pointer; min-height: 32px;
}
.site-search-panel .ss-hint { margin: 6px 12px 2px; font-size: .74rem; color: var(--color-ink-muted); }

/* Requirement-Vorschau aus KI-/Cluster-/Modul-Leitfäden. Der Link bleibt die
   primäre Aktion; Hover und Tastaturfokus liefern den vollständigen Wortlaut im Kontext. */
.req-preview { position: fixed; z-index: 1600; box-sizing: border-box; max-height: min(62vh, 520px); overflow: auto;
  padding: 12px 14px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--bg-surface);
  color: var(--color-ink); box-shadow: 0 12px 34px rgba(0, 0, 0, .22); font-size: .84rem; line-height: 1.45; }
.req-preview[hidden] { display: none; }
.req-preview-head { position: sticky; top: -12px; z-index: 1; display: flex; justify-content: space-between;
  gap: 10px; margin: -12px -14px 10px; padding: 10px 14px 8px; border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface); }
.req-preview-head code { color: var(--primary); font-weight: 700; }
.req-preview-release { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--bg-canvas); color: var(--color-ink-muted); font-size: .74rem; }
.req-preview-text { margin: 0; white-space: pre-wrap; }
.req-preview-source { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--border-default); color: var(--color-ink-muted); font-size: .76rem; }
.req-preview-loading { margin: 0; color: var(--color-ink-muted); }
@media (max-width: 639px) {
  .site-search-panel .ss-hit { grid-template-columns: 1fr; }
  .site-search-panel .ss-type { justify-self: start; }
  .site-search-panel .ss-title, .site-search-panel .ss-sub, .site-search-panel .ss-text { grid-column: 1; grid-row: auto; }
  .site-search-panel .ss-hint { display: none; }
}

/* ---------------------------------------------------------------- Kurations-Dossier: Platz, Scrollen, Zuordnung
   UX-Aufnahmen 09.10.2026 21:45 (Begründung und Volltext der Belege, Kopfzeile verrutscht) und 21:52
   (Kurationsvorschlag nicht erreichbar). Grundsatz: Jeder Bereich scrollt selbst, nichts wird abgeschnitten,
   und die Übernahmewege eines Vorschlags bleiben am unteren Rand der Diskussion sichtbar. */

/* Der Dialog selbst und seine Rahmen scrollen nie: scrollIntoView() verschob sonst über overflow: hidden
   den Kopf mit Reitern und ✕ nach oben aus dem Bild. Scrollbereiche sind nur die beiden Arbeitsbereiche. */
.dossier-modal-body,
.dossier-view-mode,
.dossier-view-editor,
.dossier-workbench-layout { overflow: hidden; overflow: clip; }
.dossier-modal { min-width: min(600px, 98vw); min-height: min(420px, 94vh); }
/* Kopf und Körper teilen die Höhe des Dialogs: Der Körper rechnete mit 50 px Kopf (calc(100% - 50px)) und
   ragte bei höherem oder umbrochenem Kopf unten aus dem Dialog, die Übernahmewege waren abgeschnitten. */
.dossier-modal[open] { display: flex; flex-direction: column; }
.dossier-modal[open] > .dossier-modal-head { flex: none; }
.dossier-modal[open] > .dossier-modal-body { flex: 1 1 auto; min-height: 0; height: auto; max-height: none; }
.dossier-modal-head { gap: 8px; padding: 10px 16px; align-items: flex-start; }
.dossier-modal-head > div:first-child { min-width: 0; flex: 1 1 auto; row-gap: 6px !important; }
.dossier-modal-head h3 { min-width: 0; overflow-wrap: anywhere; }
.dossier-modal-head h3 .ai-badge { white-space: nowrap; flex: none; }
.dossier-modal-head .dossier-close-btn { flex: none; }

/* Liste: Kopf, Kennzahlen und Werkzeugleiste brauchen weniger Höhe, damit die Belege Platz haben */
.dossier-view-editor .dossier-header .ai-note { margin: 0 0 6px; font-size: 12.5px; line-height: 1.4; }
.dossier-view-editor .dossier-meta-grid {
  margin: 6px 0 10px !important; padding: 8px 10px !important; gap: 4px 14px !important;
  font-size: 12.5px !important; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; }
.dossier-view-editor .dossier-meta-grid .dossier-stale-banner { padding: 6px 10px; font-size: 12.5px; }
.dossier-view-editor .dossier-section-head { margin-top: 12px !important; }
.dossier-view-editor .dossier-section-head h3 { margin: 0; font-size: 15px; }
.dossier-view-editor .dossier-section-head .desc, .dossier-view-editor .dossier-section-head .dossier-section-desc { margin: 2px 0 6px !important; }
.dossier-toolbar { padding: 6px 10px; margin-bottom: 8px; }
.dossier-toolbar .dossier-search-bar { margin-bottom: 6px; }
.dossier-toolbar .dossier-search-input { padding-top: 5px; padding-bottom: 5px; }
.dossier-toolbar .dossier-filter-row { gap: 6px 10px; justify-content: flex-start; }
.dossier-toolbar .dossier-filter-pill { padding: 2px 8px; font-size: 11.5px; }
.dossier-toolbar .dossier-filter-summary { margin-top: 4px; padding-top: 3px; }
.dossier-toolbar .btn-regenerate-from-context { padding: 4px 10px !important; }

/* Kartenkopf: Titel bricht um statt bei 280 px abzuschneiden; Schaltflächen mittig, bei Platzmangel darunter */
.dossier-view-editor .snippet-card-header { flex-wrap: wrap; row-gap: 6px; }
.dossier-view-editor .snippet-card-summary { flex: 1 1 260px; row-gap: 4px; }
.dossier-view-editor .snippet-card-header-actions { flex-wrap: wrap; margin-inline-start: auto; align-self: center; max-width: 100%; }
.dossier-view-editor .snippet-title {
  white-space: normal; max-width: none; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
  line-height: 1.3; flex: 1 1 200px; min-width: 0; }

/* Begründung der Zuordnung: in der Kopfzeile vollständig, im Inhalt je Eintrag mit Konfidenz, Rolle, Methode */
.snippet-card-why { flex: 1 0 100%; order: 30; font-size: 12px; line-height: 1.4; color: var(--color-ink-muted, #566269);
  padding-inline-start: 22px; overflow-wrap: anywhere; }
.snippet-card-why .why-label { font-weight: 700; color: #01696f; }
.snippet-card-why .why-meta, .snippet-card-why .why-more { color: var(--color-ink-muted, #666); font-size: 11.5px; }
.snippet-card-why .why-more { font-style: italic; }
.snippet-card .why-none { font-style: italic; color: #8a5a00; }
.snippet-assign { margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--border-default, #dcd7ce);
  border-left: 3px solid #01696f; border-radius: 6px; background: var(--bg-subtle, #f5f4ef); font-size: 12.5px; line-height: 1.45; }
.snippet-assign .assign-title { font-weight: 700; font-size: 12px; color: #01696f; margin-bottom: 4px; }
.snippet-assign .assign-sub { font-weight: 400; color: var(--color-ink-muted, #666); }
.snippet-assign ul { margin: 0; padding: 0 0 0 18px; }
.snippet-assign .assign-sub-title { margin: 8px 0 4px; font-weight: 600; font-size: 11.5px; color: var(--color-ink-muted, #666); }
.snippet-assign li + li { margin-top: 6px; }
.snippet-assign .assign-reason { display: block; overflow-wrap: anywhere; }
.snippet-assign .assign-meta { display: block; font-size: 11.5px; color: var(--color-ink-muted, #666); }
.snippet-assign .assign-meta code { font-size: 11px; }

/* Belegtext vollständig: eigener Scrollbereich statt Abschnitt; Hinweis zu Auszug/Volltext darunter */
.snippet-card-body .snippet-fulltext { max-height: min(46vh, 24em); overflow: auto; overscroll-behavior: contain; }
.snippet-card-body .snippet-fulltext p { margin: 0; overflow-wrap: anywhere; }
.snippet-fulltext-note { margin: -2px 0 8px; font-size: 11.5px; color: var(--color-ink-muted, #666); }
.snippet-card[data-fulltext="error"] .snippet-fulltext-note { color: #8a5a00; }
/* Nachladedaten des Dossiers (fold.js loadDossierData): Lade- und Fehlerhinweis über den Belegkarten */
.dossier-data-status { margin: 6px 0 10px; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; background: #f3f6fa; color: var(--color-ink-muted, #555); }
.dossier-data-status[data-state="error"] { background: #fff6e5; color: #8a5a00; border: 1px solid #f0d39a; }
.dossier-data-status .curation-btn { margin-left: 6px; }
.snippet-no-text { margin: 0 0 8px; font-style: italic; color: #8a5a00; font-size: 12.5px; }
/* Im Leitfaden zitierte Verweise (Modellausgabe, keine Belege) und entfernte Inbound-Kopien (lib_curation_modal.py) */
.dossier-dedupe-note { margin: 6px 0 10px; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; background: #f3f6fa; color: var(--color-ink-muted, #555); }
.dossier-cited-section { margin-top: 22px; padding: 10px 12px; border: 1px dashed var(--border-default, #ccc); border-radius: 8px; }
.dossier-cited-section h3 { margin: 0 0 4px; font-size: 1em; }
.dossier-cited-section .dossier-section-desc { margin: 0 0 8px; font-size: 0.88em; color: var(--color-ink-muted, #555); }
.dossier-cited-list { margin: 0; padding-left: 18px; font-size: 0.9em; }
.dossier-cited-list .cited-where { color: var(--color-ink-muted, #666); font-size: 0.92em; }

/* Breite: die Diskussion nimmt höchstens ihre Wunschbreite, den Rest die Liste (flex: 1 rechnete bei schmalen
   Fenstern 2/3 der Breite der Diskussion zu und ließ der Liste 210 px) */
.dossier-view-editor .dossier-workbench-layout > .dossier-viewer-pane { flex: 1 1 0; min-width: 0; }
.dossier-view-editor .dossier-workbench-layout > .dossier-chat-pane { flex: 0 1 clamp(340px, 38%, 540px); min-width: 0; }

/* Diskussion: der Bereich scrollt als Ganzes, wenn er nicht in die Höhe passt; Kopf und Vorschlag bleiben
   stehen. Der Kurationsvorschlag scrollt in seinem Text, die Übernahmewege darunter sind immer sichtbar. */
.dossier-chat-pane { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.dossier-chat-pane > * { flex-shrink: 0; }
.dossier-chat-pane > .chat-pane-thread { flex: 1 1 auto; min-height: clamp(72px, 16vh, 180px); max-height: none; }
.dossier-chat-pane > .chat-pane-head { position: sticky; top: 0; z-index: 4; }
.dossier-chat-pane .chat-attached-chips { max-height: 72px; min-width: 0; }
.dossier-chat-pane .chat-attached-chip { max-width: 100%; min-width: 0; }
.dossier-chat-pane .chat-attached-chip .chat-chip-goto { min-width: 0; text-align: start; }
.dossier-chat-pane .chat-attached-chip code { white-space: normal; overflow-wrap: anywhere; }
.chat-pane-proposal-box { position: sticky; bottom: 0; z-index: 3; display: flex; flex-direction: column;
  margin: 8px 8px 0; max-height: min(64%, 460px); box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.12); }
.chat-pane-proposal-box[hidden] { display: none !important; }
.chat-pane-proposal-box > .proposal-card-header { flex: none; }
.chat-pane-proposal-box > .proposal-card-body { flex: 1 1 auto; min-height: 3.6em; overflow: auto; overscroll-behavior: contain;
  overflow-wrap: anywhere; }
.chat-pane-proposal-box > .proposal-exit-section { flex: none; margin-top: 6px !important; padding-top: 6px !important; }
.chat-pane-proposal-box .proposal-card-actions { flex-direction: row !important; flex-wrap: wrap; }
.chat-pane-proposal-box .btn-proposal-exit { flex: 1 1 200px; width: auto; }
/* Eingabezeile bleibt am unteren Rand erreichbar; mit Vorschlag übernimmt der Vorschlag diesen Platz */
.dossier-chat-pane > .chat-pane-form { position: sticky; bottom: 0; z-index: 2; }
.dossier-chat-pane:has(.chat-pane-proposal-box:not([hidden])) > .chat-pane-form { position: static; }
/* mit Vorschlag zählt der Vorschlag: Schnellfragen weichen */
.dossier-chat-pane:has(.chat-pane-proposal-box:not([hidden])) .chat-pane-chips { display: none; }

/* niedrige Fenster: Werkzeugleiste scrollt mit, Erklärung entfällt, Schaltflächen etwas kleiner */
@media (max-height: 720px) {
  .dossier-toolbar { position: static; }
  .dossier-view-editor .dossier-header .ai-note { display: none; }
  .dossier-modal-head { padding: 6px 12px; }
  .dossier-modal-head h3 { font-size: 14px; }
  .dossier-modal-body { padding: 8px 12px; }
  .dossier-chat-pane > .chat-pane-thread { min-height: 64px; }
  .chat-pane-chips { padding: 6px 10px; flex-wrap: nowrap; overflow-x: auto; }
  .chat-pane-chips .workbench-prompt-chip { flex: none; white-space: nowrap; }
  .chat-pane-proposal-box { max-height: min(82%, 460px); }
  .chat-pane-proposal-box .btn-proposal-exit { padding: 5px 10px; line-height: 1.25; }
  .chat-pane-proposal-box .proposal-exit-title { margin-bottom: 4px !important; }
}
/* sehr schmale Fenster: die geöffnete Diskussion ersetzt die Liste (✕ in ihrem Kopf führt zurück) */
@media (max-width: 700px) {
  .dossier-modal.has-chat-open .dossier-viewer-pane { display: none; }
  .dossier-modal.has-chat-open .dossier-chat-pane { flex: 1 1 100%; min-width: 0; max-width: none; }
}

[data-theme="dark"] .snippet-assign { background: #1a242b; border-color: #2c3842; border-left-color: #38b2ac; }
[data-theme="dark"] .snippet-assign .assign-title, [data-theme="dark"] .snippet-card-why .why-label { color: #6edfd5; }
[data-theme="dark"] .snippet-card-why, [data-theme="dark"] .snippet-assign .assign-meta,
[data-theme="dark"] .snippet-assign .assign-sub, [data-theme="dark"] .snippet-fulltext-note,
[data-theme="dark"] .snippet-card-why .why-meta { color: #a8b5bf; }
[data-theme="dark"] .snippet-card .why-none, [data-theme="dark"] .snippet-no-text,
[data-theme="dark"] .snippet-card[data-fulltext="error"] .snippet-fulltext-note { color: #f3c969; }
[data-theme="dark"] .dossier-data-status { background: #1f2630; color: #c9d1d9; }
[data-theme="dark"] .dossier-dedupe-note { background: #1f2630; color: #c9d1d9; }
[data-theme="dark"] .dossier-data-status[data-state="error"] { background: #3a2e14; color: #f3c969; border-color: #6b5421; }
[data-theme="dark"] .snippet-assign .assign-reason { color: #e5edf2; }
[data-theme="dark"] .snippet-card-body blockquote { background: #1f2430 !important; color: #e5edf2; border-left-color: #38b2ac !important; }
[data-theme="dark"] .dossier-view-editor .dossier-meta-grid { background: #182026 !important; border-color: #2c3842 !important; color: #e5edf2; }
[data-theme="dark"] .dossier-view-editor .dossier-meta-grid code { background: #202d38 !important; color: #cfe3ea; }
[data-theme="dark"] .chat-pane-proposal-box { box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.45); }
[data-theme="dark"] .chat-pane-proposal-box .proposal-card-header span { color: #6edfd5 !important; }
[data-theme="dark"] .chat-pane-proposal-box .proposal-card-body { background: #1f1b10 !important; color: #f1e7c8; border-left-color: #b08900 !important; }
[data-theme="dark"] .chat-pane-proposal-box .proposal-exit-title { color: #cbbf9c !important; }
[data-theme="dark"] .chat-pane-proposal-box .proposal-exit-section { border-top-color: #5c4819 !important; }
[data-theme="dark"] .chat-pane-proposal-box .btn-dismiss-proposal { color: #cbbf9c !important; }

/* Plaintext-Reiter: das Textfeld (inline min-height 460 px) ragte in niedrigen Fenstern unten aus dem Dialog */
#dossier-view-prompt .raw-prompt-textarea { min-height: 120px !important; }
[data-theme="dark"] .btn-toggle-workbench-chat { background: #1c242a; border-color: #3b4954; color: #6edfd5; }
[data-theme="dark"] .btn-toggle-workbench-chat:hover { background: #253139; border-color: #49b3aa; }
[data-theme="dark"] .chip-kind.kind-inbound { background: #14373a; color: #6edfd5; }

/* Progressiver Seitenaufbau ("Building in Pieces") */
.nsx-assembling .nsx-topdock > details.nsx-fold,
.nsx-assembling .nsx-folds > details.nsx-fold,
.nsx-assembling .nsx-col,
.nsx-assembling .cluster-overview,
.nsx-assembling .cards > .card {
  animation: nsxPieceIn 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(var(--nsx-piece-idx, 0) * 32ms);
}

@keyframes nsxPieceIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Seamless Router & Progress Bar */
#seamless-router-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary, #01696f), var(--accent, #009688), #38bdf8);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 10px color-mix(in srgb, var(--primary, #01696f) 80%, transparent);
}

.is-loading-dossier {
  opacity: 0.55 !important;
  pointer-events: none !important;
  cursor: wait !important;
  animation: dossierPulsing 1s ease-in-out infinite alternate;
}

@keyframes dossierPulsing {
  from { opacity: 0.45; }
  to { opacity: 0.85; }
}

/* Instant Dossier Placeholder Dialog */
dialog.dossier-modal.is-loading-placeholder {
  width: min(92vw, 920px);
  height: 520px;
  max-height: 80vh;
  margin: auto;
  border: 1px solid var(--border-default, #cbd5e1);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  background: var(--bg-surface, #ffffff);
  color: var(--color-ink, #0f172a);
  overflow: hidden;
}
dialog.dossier-modal.is-loading-placeholder::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
}
.dossier-loading-spinner {
  border: 3px solid rgba(1, 105, 111, 0.15);
  border-top-color: var(--primary, #01696f);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* Kurations-Editor Card Performance: Virtueller Layout-Cache & Layout-Isolierung */
.dossier-view-editor #records-container,
.dossier-view-editor #snippets-container {
  contain: content;
}
.dossier-view-editor .snippet-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 60px;
  contain: layout style paint;
}

/* Cluster Guide & Tab Header Collapse & Overflow Scrolling */
.nsx-tab .nsx-stats {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px 6px;
  max-width: 100%;
}
.nsx-tab .nsx-stats-track {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 1;
  min-width: 0;
  max-width: 250px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent 100%);
}
.nsx-tab .nsx-stats-track::-webkit-scrollbar {
  display: none;
}
.nsx-tab .nsx-st {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 11px;
}
.nsx-tab .nsx-st-dossier {
  flex-shrink: 0;
  font-weight: 600;
  margin-inline-start: 4px;
  background: color-mix(in srgb, var(--primary, #01696f) 12%, transparent);
  color: var(--primary, #01696f);
  border: 1px solid color-mix(in srgb, var(--primary, #01696f) 35%, transparent);
  border-radius: 4px;
  padding: 1px 7px;
  cursor: pointer;
}
.nsx-tab .nsx-st-dossier:hover {
  background: var(--primary, #01696f);
  color: #fff;
}


/* Elemente umschließen ihre Teilbereiche (Gliederung, Mitte, Inspektor) mit einem Rahmen; die
   Kopfzeile ist dessen oberer Abschnitt (Wunsch des Admins vom 2026-10-13) */
section.nsx.nsx-live { border: 1px solid var(--border); border-radius: 8px; padding: 0 12px 12px; background: var(--bg); }
section.nsx.nsx-live > .nsx-elements-head { margin: 0 -12px 8px; border: 0; border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; }
section.nsx.nsx-live.nsx-collapsed { padding-bottom: 0; }
section.nsx.nsx-live.nsx-collapsed > .nsx-elements-head { margin-bottom: 0; border-bottom: 0; }
section.nsx.nsx-live.nsx-tdocked > .nsx-elements-head { margin: 0 -12px 2px; padding: 4px 6px 0; border-bottom: 0; }
/* Panel der angedockten Elemente: bündig unter dem Reiter wie die übrigen Panels; Gliederung und
   Inspektor haften am oberen Rand des Panels statt unter der Titelleiste */
section.nsx.nsx-live.nsx-tdocked.nsx-pop { position: fixed; z-index: 1000; margin: 0;
  max-height: var(--nsx-pop-h, calc(100vh - 120px)); overflow: auto; overscroll-behavior: contain; background: var(--bg);
  border: 1px solid var(--primary); border-top: 0; border-start-start-radius: 0; border-start-end-radius: 8px;
  border-end-start-radius: 8px; border-end-end-radius: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); --nsx-top: 0px; }
section.nsx.nsx-pop .nsx-outline, section.nsx.nsx-pop .nsx-aside { max-height: calc(var(--nsx-pop-h, 100vh) - 2 * var(--space-3)); }
section.nsx.nsx-pop .nsx-aside { height: calc(var(--nsx-pop-h, 100vh) - 2 * var(--space-3)); }
/* Historie (Gruppierung „Historie“): Tabelle Release × Element in der Gliederung, Unterschiede im
   Inspektor und farbige Markierung in der Detailansicht. Versionsspannen im Raster verwenden den
   repositoryweiten, kontinuierlich aus der Wellenlänge berechneten Release-Regenbogen aus ns-index.js. */
.nsx { --nsx-h-add: #1f8f4e; --nsx-h-chg: #c58a00; --nsx-h-del: #c43c3c; --nsx-h-pre: color-mix(in srgb, var(--muted) 35%, transparent); --nsx-h-pdf: #5b6f8f; --nsx-h-cur: var(--primary); }
[data-theme="dark"] .nsx { --nsx-h-add: #4cc985; --nsx-h-chg: #e3b341; --nsx-h-del: #f07070; --nsx-h-pdf: #9fb3d6; }
a.nsx-oi.sel { --nsx-h-cur: var(--primary); --nsx-h-row-edge: #fff; }
[data-theme="dark"] a.nsx-oi.sel { --nsx-h-row-edge: #111; }
@media (min-width: 1201px) { .nsx.nsx-live.nsx-hist { grid-template-columns: var(--nsx-ol-w, 330px) minmax(0, 1fr) var(--nsx-aside-w, 300px); } }
@media (min-width: 761px) and (max-width: 1200px) { .nsx.nsx-live.nsx-hist { grid-template-columns: var(--nsx-ol-w, 300px) minmax(0, 1fr); } }
.nsx-ol[data-by="since"] .nsx-ai, .nsx-ol[data-by="since"] .nsx-ais, .nsx-ol[data-by="since"] .nsx-hb { display: none !important; }
.nsx-ol[data-by="since"] a.nsx-oi-h { padding-block: 2px 5px; padding-inline-start: 4px; gap: 6px; }
.nsx-hcells { position: relative; flex: none; display: inline-flex; gap: 2px; margin-inline-start: auto; }
.nsx-hhead { position: sticky; top: 0; z-index: 4; display: flex; align-items: flex-end; gap: 6px; padding: 2px 0 4px 4px;
  background: var(--bg); border-bottom: 1px solid var(--border); font-size: 10.5px; color: var(--faint); }
.nsx-hhead-n { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nsx-hhead-title { font-weight: 650; }
.nsx-hlegend { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; font: 8.5px/1.2 var(--font-sans, inherit); color: var(--faint); }
.nsx-hlegend-states, .nsx-hlegend-states > span, .nsx-hscale { display: inline-flex; align-items: center; gap: 3px; }
.nsx-hlegend-states { flex-wrap: wrap; gap: 3px 6px; }
.nsx-hlegend-swatch { position: relative; display: inline-block; width: 11px; height: 8px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 2px; background: var(--surface2); }
.nsx-hscale { font: 8px/1 var(--font-mono); white-space: nowrap; }
.nsx-hscale-bar { display: inline-block; width: 48px; height: 6px; border: 1px solid color-mix(in srgb, var(--text) 35%, transparent); border-radius: 3px; background-image: var(--nsx-rainbow-gradient); }
[data-theme="dark"] .nsx-hscale-bar { background-image: var(--nsx-rainbow-gradient-dark); }
.nsx-hcol { flex: none; width: 15px; writing-mode: vertical-rl; transform: rotate(180deg); font: 600 9.5px/15px var(--font-mono); text-align: start; white-space: nowrap; }
.nsx-hcol.cur { color: var(--primary); }
.nsx-hc { flex: none; width: 15px; height: 13px; border-radius: 3px; box-sizing: border-box; border: 1px dashed color-mix(in srgb, var(--border) 80%, transparent); cursor: default; }
.nsx-hc[class*="nsx-hc-"] { border-style: solid; cursor: pointer; }
.nsx-hc-pre:not(.nsx-hc-span) { background: var(--nsx-h-pre); border-width: 0; border-color: transparent; }
.nsx-hc.run-s { width: 16px; margin-inline-end: -1px; border-start-end-radius: 0; border-end-end-radius: 0; }
.nsx-hc.run-m { width: 17px; margin-inline: -1px; border-radius: 0; }
.nsx-hc.run-e { width: 16px; margin-inline-start: -1px; border-start-start-radius: 0; border-end-start-radius: 0; }
.nsx-hc-span { background: var(--nsx-span-color); border-color: var(--nsx-span-color); }
[data-theme="dark"] .nsx-hc-span { background: var(--nsx-span-color-dark); border-color: var(--nsx-span-color-dark); }
.nsx-hc-span.nsx-hc-pre { border-width: 0; }
.nsx-hc-add:not(.nsx-hc-span) { background: var(--nsx-h-add); border-color: var(--nsx-h-add); }
.nsx-hc-chg:not(.nsx-hc-span) { background: var(--nsx-h-chg); border-color: var(--nsx-h-chg); }
.nsx-hc-del { border-color: var(--nsx-h-del); background: repeating-linear-gradient(135deg, transparent 0 3px, var(--nsx-h-del) 3px 4.5px); }
/* im PDF vorhanden, Wortlaut nicht erfasst: Schraffur in Gegenrichtung, gedämpft, kein Vergleichszustand */
.nsx-hc-pdf { border-color: var(--nsx-h-pdf); background: repeating-linear-gradient(45deg, transparent 0 2px, color-mix(in srgb, var(--nsx-h-pdf) 70%, transparent) 2px 3.5px); }
/* erste Fassung mit Wortlaut nach Präsenz-Zellen: weder „neu“ noch „geändert“ */
.nsx-hc-cap:not(.nsx-hc-span) { background: color-mix(in srgb, var(--nsx-h-add) 45%, transparent); border-color: var(--nsx-h-add); }
.nsx-hc.span-start { position: relative; }
.nsx-hc.span-start.nsx-hc-add::before, .nsx-hlegend-swatch.nsx-hc-add::before { content: ""; position: absolute; z-index: 1; inset-inline-start: 2px; top: 50%; width: 4px; height: 4px; border-radius: 50%; transform: translateY(-50%); background: #111; box-shadow: 0 0 0 1px rgba(255, 255, 255, .78); }
.nsx-hc.span-start.nsx-hc-chg::before, .nsx-hlegend-swatch.nsx-hc-chg::before { content: ""; position: absolute; z-index: 1; inset-inline-start: 1px; top: 1px; bottom: 1px; width: 2px; border-radius: 1px; background: #111; box-shadow: 1px 0 0 rgba(255, 255, 255, .68); }
[data-theme="dark"] .nsx-hc.span-start.nsx-hc-add::before, [data-theme="dark"] .nsx-hlegend-swatch.nsx-hc-add::before,
[data-theme="dark"] .nsx-hc.span-start.nsx-hc-chg::before, [data-theme="dark"] .nsx-hlegend-swatch.nsx-hc-chg::before { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .8); }
.nsx-hc.cur { position: relative; z-index: 1; border: 1px solid var(--nsx-h-cur, var(--primary)); box-shadow: 0 0 0 1.5px var(--nsx-h-cur, var(--primary)); outline: 1.5px solid var(--nsx-h-cur, var(--primary)); outline-offset: 0px; }
.nsx-hc-span.cur { border-color: var(--nsx-span-color); outline-color: var(--nsx-h-cur, var(--primary)); outline-offset: -1px; box-shadow: inset 0 0 0 1.5px var(--nsx-h-cur, var(--primary)); }
[data-theme="dark"] .nsx-hc-span.cur { border-color: var(--nsx-span-color-dark); }
.nsx-hc.cur:not([class*="nsx-hc-"]), .nsx-hc.nsx-hc-del.cur, .nsx-hc.cur-abs { border: 1.5px dashed var(--nsx-h-cur, var(--primary)); box-shadow: none; outline: 1.5px dashed var(--nsx-h-cur, var(--primary)); outline-offset: -1.5px; cursor: pointer; }
.nsx-hc.sel, .nsx-hc[class*="nsx-hc-"]:hover { position: relative; z-index: 2; outline: 2px solid var(--nsx-h-cur, var(--primary)); outline-offset: 1px; }
.nsx-hc-span.sel, .nsx-hc-span:hover { outline-color: var(--nsx-h-cur, var(--primary)); outline-offset: -2px; box-shadow: inset 0 0 0 2px var(--nsx-h-cur, var(--primary)); }
/* Die Zeilenauswahl darf zusammenhängende Release-Spannen nicht durch helle Zellrahmen zerlegen. */
a.nsx-oi.sel .nsx-hc-span { box-shadow: none; }
a.nsx-oi.sel .nsx-hc-span.cur { box-shadow: inset 0 0 0 1.5px var(--nsx-h-cur, var(--primary)); }
a.nsx-oi.sel .nsx-hc-span.sel, a.nsx-oi.sel .nsx-hc-span:hover { box-shadow: inset 0 0 0 2px var(--nsx-h-cur, var(--primary)); }
.nsx-harrow { position: absolute; top: 13px; right: auto; height: 6px; color: #fff; filter: drop-shadow(0 0 1px #111) drop-shadow(0 0 1px #111); pointer-events: none; overflow: visible; z-index: 3; }
a.nsx-oi.sel .nsx-harrow { color: rgba(255, 255, 255, .92); }
a.nsx-oi.sel .nsx-hc-pre:not(.nsx-hc-span) { background: rgba(255, 255, 255, .55); }
a.nsx-oi.sel .nsx-hc:not([class*="nsx-hc-"]):not(.cur) { border-color: rgba(255, 255, 255, .45); }
/* Inspektor: Änderungen */
.nsx-rel .nsx-hist-is h4 { margin-top: var(--space-2); }
.nsx-hpair { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 12px; color: var(--muted); }
.nsx-hpair select { font: 12px var(--font-mono); padding: 1px 4px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); }
.nsx-hnote { margin: 4px 0 6px; font-size: 11px; color: var(--faint); }
.nsx-hk { display: inline-block; padding: 0 5px; border-radius: 3px; font: 600 10px/1.5 var(--font-sans, inherit); color: #fff; vertical-align: 1px; letter-spacing: 0; text-transform: none; }
.nsx-hk-add { background: var(--nsx-h-add); } .nsx-hk-chg { background: var(--nsx-h-chg); } .nsx-hk-del { background: var(--nsx-h-del); }
.nsx-hk-same, .nsx-hk-none, .nsx-hk-notext { background: var(--faint); }
p.nsx-hstate { display: inline-block; margin: 2px 0 6px; padding: 1px 7px; border-radius: 4px; color: #fff; font-size: 12px; }
.nsx-hrec { margin: var(--space-3) 0 2px; font: 600 11.5px var(--font-mono); }
.nsx-hdl { margin: 0; font-size: 12px; }
.nsx-hdl dt { margin-top: 6px; font-weight: 600; color: var(--muted); }
.nsx-hdl dd { margin: 2px 0 0; padding: 2px 6px; border-inline-start: 3px solid var(--border); overflow-wrap: anywhere; }
.nsx-hdl dd.nsx-hd-chg { border-color: var(--nsx-h-chg); }
.nsx-hdl dd.nsx-hd-add { border-color: var(--nsx-h-add); }
.nsx-hdl dd.nsx-hd-del { border-color: var(--nsx-h-del); }
.nsx ins.ve-word-added, .nsx ins { background: color-mix(in srgb, var(--nsx-h-add) 22%, transparent); color: inherit; text-decoration: none; border-radius: 2px; }
.nsx del.ve-word-deleted, .nsx del { background: color-mix(in srgb, var(--nsx-h-del) 18%, transparent); color: inherit; text-decoration: line-through; text-decoration-color: var(--nsx-h-del); border-radius: 2px; }
/* Detailansicht: nur Unterschiede farbig */
.nsx-detbody article.rec.nsx-hl-add { box-shadow: inset 3px 0 0 var(--nsx-h-add); padding-inline-start: 10px; }
.nsx-detbody article.rec.nsx-hl-del { box-shadow: inset 3px 0 0 var(--nsx-h-del); padding-inline-start: 10px; opacity: .8; }
.nsx-detbody article.rec.nsx-hl-chg { box-shadow: inset 3px 0 0 var(--nsx-h-chg); padding-inline-start: 10px; }
.nsx-detbody .nsx-hl-chg.syntax, .nsx-detbody div.desc.nsx-hl-chg { outline: 1px solid color-mix(in srgb, var(--nsx-h-chg) 60%, transparent); outline-offset: 2px; border-radius: 4px; }
.nsx-detbody div.desc.nsx-hl-chg { padding: 2px 6px; background: color-mix(in srgb, var(--nsx-h-chg) 6%, transparent); }
p.nsx-hrelnote { margin: 2px 0 6px; font-size: 12px; color: var(--muted); }
table.nsx-hprops { width: 100%; margin: var(--space-3) 0; border-collapse: collapse; font-size: 12.5px; }
table.nsx-hprops caption { text-align: start; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-bottom: 4px; }
table.nsx-hprops th, table.nsx-hprops td { text-align: start; vertical-align: top; padding: 3px 6px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
table.nsx-hprops th { width: 24%; color: var(--muted); font-weight: 600; }
table.nsx-hprops tr.nsx-hl-chg { background: color-mix(in srgb, var(--nsx-h-chg) 12%, transparent); }
table.nsx-hprops tr.nsx-hl-add { background: color-mix(in srgb, var(--nsx-h-add) 12%, transparent); }
table.nsx-hprops tr.nsx-hl-del { background: color-mix(in srgb, var(--nsx-h-del) 10%, transparent); }

/* Historie: Release-Kopf wählt das Release (gewähltes Release deutlich markiert); Inspektor
   zeigt beim Überfahren einer Zelle eine Vorschau */
.nsx-hcol { cursor: pointer; border-radius: 3px; padding: 3px 0; }
.nsx-hcol:hover, .nsx-hcol:focus-visible { color: var(--primary); background: var(--surface2); outline: none; }
.nsx-hcol.cur { color: #fff; background: var(--primary); }
.nsx-hpair code { font-size: 12px; }
.nsx-rel .nsx-hist-is.nsx-hist-hover { outline: 1px dashed var(--primary); outline-offset: 4px; border-radius: 4px; }
/* Name in der Titelzeile der Detailansicht: Verweis auf die eigene Kompaktansicht des Elements */
.nsx-dettitle a.nsx-detname { cursor: pointer; pointer-events: auto; }
.nsx-dettitle a.nsx-detname:hover { text-decoration-thickness: 2px; }
.nsx-dettitle a.nsx-detname:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
/* Inspektor: Doppelklick öffnet die Ansicht eines Elements */
.nsx-rel [data-jump], .nsx-rel a[data-n] { cursor: pointer; }

/* ---- Gliederung (Admin, 2026-10-14): Leiste „Gruppierung nach“ bleibt oben stehen, Knöpfe neben der
   Beschriftung (umbrechend nur, wo die Breite nicht reicht, und dann neben der Beschriftung); der Kopf des
   Release-Rasters klebt darunter. Teiler zwischen Gliederung und Mitte (ns-index.js, --nsx-ol-w). */
.nsx.nsx-live .nsx-outline > .nsx-by { position: sticky; top: 0; z-index: 3; background: var(--bg);
  flex-wrap: nowrap; align-items: baseline; gap: 6px; margin: 0; padding: 2px 0 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.nsx-by > .kind { flex: none; white-space: nowrap; }
.nsx-by > .nsx-by-btns { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.nsx.nsx-live .nsx-ol[data-by="since"] .nsx-hhead { top: var(--nsx-by-h, 0px); }
.nsx.nsx-live { position: relative; }
.nsx-olsplit { position: absolute; top: 0; bottom: 0; left: 0; width: var(--space-5); cursor: col-resize; touch-action: none; z-index: 4; }
.nsx-olsplit[hidden] { display: none; }
.nsx-olsplit::after { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: calc(50% - 1.5px); width: 3px;
  border-radius: 2px; background: transparent; }
.nsx-olsplit:hover::after, .nsx-olsplit:focus-visible::after, .nsx-resizing .nsx-olsplit::after { background: var(--primary); opacity: .45; }
.nsx-olsplit:focus-visible { outline: none; }
.nsx.nsx-collapsed .nsx-olsplit, .nsx.nsx-small .nsx-olsplit { display: none; }

/* ---- Kennung ohne exportierten Record (lib_docmodel.unlink_records_without_data): Text statt Verweis */
.spec-nodata { white-space: nowrap; }
.spec-nodata-mark { display: inline-block; margin-inline-start: 2px; padding: 0 5px; border-radius: 3px; font-size: .78em;
  font-weight: 500; line-height: 1.5; color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent);
  white-space: nowrap; vertical-align: 1px; letter-spacing: 0; text-transform: none; }

/* Kopfzeile eines KI-Leitfadens (Admin-Layout 2026-10-14): Stufen-Badge, Fassungs-Badge mit Daumen,
   „Feedback geben“, „Mit KI diskutieren“, Kurations-Editor in einer Zeile oben im Guide (statt der Links darunter).
   Bricht sauber um (schmale Bildschirme), logische Abstände für RTL (ar); überlappt nie den Titel (eigene Zeile). */
.ai-guide-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 10px; min-width: 0; }
.ai-guide-head > .ai-level-nav { margin: 0; flex: none; }
.ai-guide-head > .ai-commentary-actions { display: contents; }
.ai-guide-head .btn-discuss-ai, .ai-guide-head .btn-curate-link, .ai-guide-head .btn-feedback-action {
  padding: 3px 10px; font-size: 12.5px; font-weight: 600; gap: 4px; border-radius: 999px; line-height: 1.3; white-space: nowrap; }
.ai-guide-head .btn-curate-link { margin-inline-start: auto; }
.ai-variant-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; max-width: 100%;
  font-size: 12.5px; line-height: 1.25; color: var(--muted); }
.ai-variant-badge[data-ai-guide-id] { flex: 1 0 calc(100% - 300px); flex-wrap: nowrap; }
.ai-variant-name { padding: 3px 10px; border: 1px solid var(--border-default, var(--border)); border-radius: 999px;
  font-weight: 600; color: var(--text); white-space: nowrap; }
.ai-variant-toggle { display: inline-flex; align-items: stretch; padding: 0; font: inherit; font-size: 12px; line-height: 1.2;
  border: 1px solid var(--border-default, var(--border)); border-radius: 999px; overflow: hidden; background: transparent;
  color: var(--muted); cursor: pointer; max-width: 100%; flex-wrap: wrap; flex: none; }
.ai-variant-toggle:hover { border-color: var(--primary); }
.ai-variant-toggle:focus-visible, .ai-variant-vote:focus-visible, .ai-variant-layout:focus-visible {
  outline: 2px solid var(--color-focus, var(--primary)); outline-offset: 2px; }
.ai-variant-opt-wrap { display: inline-flex; align-items: center; gap: 2px; padding-inline: 3px; }
.ai-variant-opt-wrap.is-current { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.ai-variant-opt { padding: 2px 6px; font-weight: 600; white-space: nowrap; }
.ai-variant-opt.is-current { background: var(--primary); color: #fff; font-weight: 600; }
.ai-variant-meta { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; }
.ai-variant-meta code { font-size: 11px; white-space: nowrap; overflow-wrap: normal; }
.ai-variant-vote { font: inherit; font-size: 11px; line-height: 1; padding: 1px 3px; min-width: 28px; min-height: 28px;
  border: 1px solid var(--border-default, var(--border)); border-radius: 999px; background: var(--bg, #fff); cursor: pointer;
  filter: grayscale(1); opacity: .78; white-space: nowrap; flex: none; }
.ai-double-thumb { display: inline-block; position: relative; width: 16px; height: 15px; vertical-align: -3px; }
.ai-double-thumb > span { position: absolute; inset: 0 auto auto 0; font-size: 10px; line-height: 1; }
.ai-double-thumb > span:last-child { inset: 4px 0 auto auto; }
.ai-variant-layout { align-self: center; margin: 1px; padding: 0; width: 28px; min-width: 28px; min-height: 28px;
  border: 1px solid var(--border-default, var(--border)); border-radius: 5px; background: var(--bg, #fff);
  color: var(--text); cursor: pointer; font: 600 14px/1 inherit; }
.ai-variant-layout[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-highlight, rgba(1,105,111,.16)); }
.ai-variant-vote:hover { border-color: var(--primary); opacity: 1; }
.ai-variant-vote[aria-pressed="true"] { filter: none; opacity: 1; border-color: var(--primary); background: var(--primary-highlight, rgba(1,105,111,.16)); }
.ai-variant-vote[disabled],
.ai-variant-vote[aria-disabled="true"] { cursor: progress; }
.ai-variant-vote.is-busy { cursor: progress; opacity: .55; }
.ai-variant[hidden] { display: none !important; }
.ai-variant-compare-toolbar { display: none; }
.ai-variants[data-ai-variant-layout="side-by-side"] { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px; row-gap: 0; align-items: start; }
.ai-variants[data-ai-variant-layout="side-by-side"]::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 50%;
  border-inline-start: 1px solid var(--border-default, var(--border)); pointer-events: none; }
.ai-variants[data-ai-variant-layout="side-by-side"] > .ai-variant-compare-toolbar { display: flex; grid-column: 1 / -1;
  justify-content: center; position: relative; z-index: 1; margin: 0 auto 8px; padding-inline: 6px; background: var(--bg, #fff); }
.ai-variants[data-ai-variant-layout="side-by-side"] > .ai-variant > .ai > .ai-guide-head .ai-variant-badge { display: none; }
.ai-variant-compare-toolbar .ai-variant-badge { flex: none; }
.ai-variant-compare-toolbar .ai-variant-meta { display: none; }
.ai-variant [data-ai-heading-align] { padding-block-start: var(--ai-heading-align, 0); scroll-margin-top: 6rem; }
.ai-variant[data-ai-relative-score] .ai-level { font-size: calc(1em * var(--ai-variant-font-factor)); }
.ai-variant[data-ai-relative-score] .ai-level :is(button, input, select, textarea) { font-size: calc(1em / var(--ai-variant-font-factor)); }
/* Komfortansicht: etwas mehr Luft; Kompaktansicht: kleinere Knöpfe, Werkzeugtexte nur als Symbol mit Tooltip */
[data-density="comfortable"] .ai-guide-head { gap: 8px 10px; margin: 8px 0 12px; }
[data-density="compact"] .ai-guide-head { gap: 4px 6px; margin: 4px 0 8px; }
[data-density="compact"] .ai-guide-head .btn-discuss-ai, [data-density="compact"] .ai-guide-head .btn-curate-link,
[data-density="compact"] .ai-guide-head .btn-feedback-action { padding: 2px 8px; font-size: 12px; }
@media (max-width: 640px) {
  .ai-variants[data-ai-variant-layout="side-by-side"] { grid-template-columns: minmax(0, 1fr); }
  .ai-variants[data-ai-variant-layout="side-by-side"]::before { display: none; }
  .ai-guide-head .btn-curate-link { margin-inline-start: 0; }
  .ai-variant-badge[data-ai-guide-id] { flex: 1 1 100%; flex-wrap: wrap; }
  .ai-variant-toggle { flex: 0 1 auto; }
  .ai-variant-meta { flex: 1 1 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media print { .ai-guide-head { display: none !important; } }

/* ---- Versions & Provenienz-Explorer: Gruppieren & Sortieren Overlay & Filter-Chips (WP-EX) ---- */
.ve-chiprow { grid-column: 2 / -1; grid-row: 1; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-height: 2.2rem; margin: 0; padding: 0 0 .2rem; position: relative; z-index: 20; }
.ve-chips { display: inline-flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.ve-chips[hidden] { display: none; }
.ve-ocard { position: relative; display: inline-flex; align-items: center; margin: 0; }
.ve-ohead { appearance: none; display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--border-default); border-radius: 6px; background: var(--bg-surface); color: var(--color-ink); font: inherit; font-size: .8rem; font-weight: 600; padding: .25rem .6rem; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.ve-ohead:hover { background: var(--bg-subtle); border-color: var(--color-teal-600); }
.ve-ohead:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.ve-ocard.is-open .ve-ohead { background: var(--bg-subtle); border-color: var(--color-teal-600); }
.ve-ocaret { display: inline-block; width: .8rem; color: var(--color-ink-muted); transition: transform .12s; }
.ve-ocard.is-open .ve-ocaret { transform: rotate(90deg); }
[dir=rtl] .ve-ocaret { transform: scaleX(-1); }
[dir=rtl] .ve-ocard.is-open .ve-ocaret { transform: rotate(90deg); }
.ve-otitle { white-space: nowrap; }
.ve-obody { position: absolute; top: calc(100% + 4px); inset-inline-start: 0; z-index: 100; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: .65rem .85rem; min-width: 420px; max-width: min(720px, 94vw); box-sizing: border-box; display: flex; flex-direction: column; gap: .5rem; }
.ve-obody[hidden] { display: none; }
.ve-oactions { display: flex; align-items: center; gap: .4rem; border-bottom: 1px solid var(--border-default); padding-bottom: .4rem; }
.ve-oactions .ve-oicon { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; padding: 0; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-surface); color: var(--color-ink); cursor: pointer; font-size: .85rem; line-height: 1; }
.ve-oactions .ve-oicon:hover:not(:disabled) { background: var(--bg-subtle); border-color: var(--color-teal-600); }
.ve-oactions .ve-oicon:disabled { opacity: .4; cursor: default; }
.ve-oreset { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; font: inherit; font-size: .76rem; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-surface); color: var(--color-ink-muted); cursor: pointer; }
.ve-oreset:hover:not(:disabled) { background: var(--bg-subtle); color: var(--color-ink); border-color: var(--color-teal-600); }
.ve-oreset:disabled { opacity: .4; cursor: default; }
.ve-orow { display: flex; align-items: stretch; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--border-subtle, var(--border-default)); }
.ve-orow:last-child { border-bottom: none; }
.ve-ovlabel { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-weight: 700; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--color-ink-muted); padding: .2rem .25rem; user-select: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 2.2rem; }
[dir=rtl] .ve-ovlabel { writing-mode: vertical-rl; transform: rotate(180deg); }
.ve-orow-content { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; flex: 1; min-width: 0; }
.ve-olevel { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.ve-olvl-tag { font-size: .68rem; font-weight: 700; color: var(--color-ink-muted); background: var(--bg-subtle); border-radius: 3px; padding: .05rem .3rem; line-height: 1.2; }
.ve-obadge { appearance: none; display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--color-ink); font: inherit; font-size: .76rem; padding: .2rem .55rem; cursor: pointer; user-select: none; transition: border-color .12s, background-color .12s, color .12s; line-height: 1.3; white-space: nowrap; }
.ve-obadge:hover { border-color: var(--color-teal-600); background: var(--bg-subtle); }
.ve-obadge:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.ve-obadge.is-selected { background: var(--color-teal-600); border-color: var(--color-teal-600); color: #fff; font-weight: 600; }
.ve-obadge.is-selected:hover { filter: brightness(1.08); }
.ve-obadge-dir { font-weight: 700; font-size: .82rem; line-height: 1; }
.ve-obadge-x { display: inline-flex; align-items: center; justify-content: center; margin-inline-start: .2rem; width: 1rem; height: 1rem; border-radius: 999px; font-size: .68rem; line-height: 1; background: rgba(0,0,0,.18); color: #fff; cursor: pointer; transition: background-color .12s; }
.ve-obadge-x:hover { background: rgba(0,0,0,.4); }
/* Kette Sortieren → Gruppieren → … → Sortieren: abgeschlossene Blöcke knapp, senkrechte Beschriftungen, der aktive Block zuletzt */
.ve-obody:has(.ve-ochain) { width: max-content; }
.ve-ochain { display: flex; flex-wrap: wrap; align-items: stretch; gap: .45rem; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.ve-oblock { display: flex; align-items: stretch; gap: .35rem; min-width: 0; box-sizing: border-box; padding: .3rem .4rem; border: 1px solid var(--border-subtle, var(--border-default)); border-radius: 6px; background: var(--bg-surface); }
.ve-oblock-g { background: var(--bg-subtle); }
.ve-oblock.is-active, .ve-oblock.is-picking { flex: 1 1 13rem; }
.ve-ovcol { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; flex-shrink: 0; }
.ve-ovcol .ve-ovlabel { min-height: 0; padding: .1rem .15rem; }
.ve-ochoices { display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: .3rem; flex: 1 1 auto; min-width: 0; }
.ve-oblock > .ve-obadge { align-self: center; }
.ve-ocrits { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: .25rem; }
.ve-obadge.is-vertical { flex-direction: column; justify-content: center; gap: .25rem; padding: .45rem .22rem; }
.ve-obadge.is-vertical .ve-obadge-l { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.ve-obadge.is-vertical .ve-obadge-x { margin-inline-start: 0; }
.ve-obadge.is-selected.is-inert { background: var(--bg-surface); color: var(--color-ink); border-style: dashed; font-weight: 500; }
.ve-obadge.is-inert .ve-obadge-x { color: var(--color-ink); background: rgba(0,0,0,.08); }
.ve-otrash { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--color-ink-muted); cursor: pointer; flex-shrink: 0; }
.ve-otrash:hover { color: #b42318; border-color: currentColor; background: var(--bg-surface); }
.ve-oplus { appearance: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: .35rem .2rem; border: 1px dashed var(--color-teal-600); border-radius: 6px; background: transparent; color: var(--color-teal-700); font: inherit; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.ve-oplus:hover { background: var(--bg-subtle); }
.ve-oplus-t { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.ve-otrash:focus-visible, .ve-oplus:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
html[data-theme=dark] .ve-oblock { background: #0f172a; border-color: #334155; }
html[data-theme=dark] .ve-oblock-g { background: #1e293b; }
html[data-theme=dark] .ve-otrash { color: #94a3b8; }
html[data-theme=dark] .ve-otrash:hover { color: #fca5a5; background: #1e293b; }
html[data-theme=dark] .ve-obadge.is-selected.is-inert { background: #0f172a; color: #f1f5f9; }
html[data-theme=dark] .ve-obadge.is-inert .ve-obadge-x { color: #f1f5f9; background: rgba(255,255,255,.12); }
html[data-density=compact] .ve-oblock { padding: .2rem .3rem; gap: .25rem; }
html[data-density=compact] .ve-ochain { gap: .3rem; }
/* Telefonbreite: das Widget bleibt im Bildschirm, die Kette bricht um bzw. rollt darin */
@media (max-width: 560px) {
  .ve-ocard { position: static; }
  .ve-obody { min-width: 0; inset-inline-start: 0; inset-inline-end: 0; max-width: 100%; }
}

html[data-density=compact] .ve-chiprow { gap: .25rem; min-height: 1.8rem; padding-bottom: .15rem; }
html[data-density=compact] .ve-ohead { padding: .15rem .45rem; font-size: .74rem; min-height: 24px; border-radius: 4px; }
html[data-density=compact] .ve-obody { padding: .4rem .6rem; gap: .35rem; }
html[data-density=compact] .ve-obadge { padding: .12rem .4rem; font-size: .72rem; min-height: 20px; }
html[data-density=compact] .ve-orow { padding: .2rem 0; gap: .35rem; }

html[data-density=comfortable] .ve-chiprow { gap: .55rem; min-height: 2.4rem; padding-bottom: .35rem; }
html[data-density=comfortable] .ve-ohead { padding: .32rem .75rem; font-size: .86rem; min-height: 34px; border-radius: 6px; }
html[data-density=comfortable] .ve-obody { padding: .8rem 1.05rem; gap: .65rem; }
html[data-density=comfortable] .ve-obadge { padding: .22rem .65rem; font-size: .8rem; min-height: 26px; }
html[data-density=comfortable] .ve-orow { padding: .45rem 0; gap: .65rem; }

html[data-theme=dark] .ve-ohead { background: #1e293b; border-color: #334155; color: #f1f5f9; }
html[data-theme=dark] .ve-ohead:hover { background: #334155; }
html[data-theme=dark] .ve-obody { background: #0f172a; border-color: #334155; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
html[data-theme=dark] .ve-obadge { background: #1e293b; border-color: #334155; color: #f1f5f9; }
html[data-theme=dark] .ve-obadge:hover { background: #334155; }
/* Dunkel: Weiß auf dem hellen Akzent (#2aa3ab 3,0:1, kompakt #8d92f2 2,8:1) liegt unter 4,5:1; dunkle Schrift 5,9:1 bzw. 6,4:1 */
html[data-theme=dark] .ve-obadge.is-selected { background: var(--color-teal-600); border-color: var(--color-teal-600); color: #0f172a; }
html[data-theme=dark] .ve-obadge.is-selected:not(.is-inert) .ve-obadge-x { background: rgba(255,255,255,.3); color: #0f172a; }
html[data-theme=dark] .ve-obadge.is-selected:not(.is-inert) .ve-obadge-x:hover { background: rgba(255,255,255,.55); }
html[data-theme=dark] .ve-oactions .ve-oicon, html[data-theme=dark] .ve-oreset { background: #1e293b; border-color: #334155; color: #f1f5f9; }
html[data-theme=dark] .ve-olvl-tag { background: #334155; color: #94a3b8; }

/* ---- Versions & Provenienz-Explorer: Hierarchische Gruppenköpfe & Sticky-Stacking (WP-EX Part 2) ---- */
.ve-grow {
  justify-content: center;
  overflow: hidden;
  transition: background-color .12s, border-color .12s;
}
.ve-grow:hover { filter: brightness(.97); }
html[data-theme=dark] .ve-grow:hover { filter: brightness(1.08); }
.ve-busy { display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: 0; color: var(--color-ink-muted); font-size: .78rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.ve-busy[hidden] { display: none; }
.ve-busy-spin { width: .8rem; height: .8rem; flex: 0 0 auto; box-sizing: border-box; border: 2px solid var(--border-default); border-inline-start-color: var(--color-teal-600); border-radius: 50%; animation: ve-busy-spin .7s linear infinite; }
@keyframes ve-busy-spin { to { transform: rotate(360deg); } }
html[data-theme=dark] .ve-busy { color: #94a3b8; }
html[data-density=compact] .ve-busy { font-size: .72rem; }
@media (prefers-reduced-motion: reduce) {
  .ve-ohead, .ve-ocaret, .ve-obadge, .ve-obadge-x, .ve-grow { transition: none; }
  .ve-busy-spin { animation: none; }
}

.ve-ghead {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}
.ve-gcaret { width: 1rem; flex-shrink: 0; font-size: .95rem; line-height: 1; }
.ve-glabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ve-gcount {
  margin-inline-start: auto;
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.4;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 0 .45rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-ink);
}

/* Ebene 1: Größter Kopf (~1.0rem, 700), volles Band mit Akzent-Tönung, dicker linker Balken */
.ve-grow[data-level="1"] {
  background: var(--ve-g1-bg);
  border-inline-start: 4px solid var(--ve-g1-bar);
  color: var(--ve-g1-text);
  inset-inline-start: 0;
  inset-inline-end: 0;
  left: 0;
  right: 0;
}
.ve-grow[data-level="1"] .ve-ghead { font-size: 1.0rem; }
.ve-grow[data-level="1"] .ve-glabel { font-weight: 700; color: var(--ve-g1-text); }
.ve-grow[data-level="1"] .ve-gfield { font-size: .82rem; font-weight: 600; color: var(--ve-g1-muted); flex-shrink: 0; }
.ve-grow[data-level="1"] .ve-gcaret { color: var(--ve-g1-bar); }

/* Ebene 2: Kleiner (~0.9rem, 600), eingerückt ca. 12px, hellere Tönung 2. Farbton, dünnerer Balken */
.ve-grow[data-level="2"] {
  background: var(--ve-g2-bg);
  border-inline-start: 2px solid var(--ve-g2-bar);
  color: var(--ve-g2-text);
  inset-inline-start: 12px;
  inset-inline-end: 0;
  left: 12px;
  right: 0;
}
[dir=rtl] .ve-grow[data-level="2"] { left: 0; right: 12px; }
.ve-grow[data-level="2"] .ve-ghead { font-size: 0.9rem; }
.ve-grow[data-level="2"] .ve-glabel { font-weight: 600; color: var(--ve-g2-text); }
.ve-grow[data-level="2"] .ve-gfield { font-size: .78rem; font-weight: 500; color: var(--ve-g2-muted); flex-shrink: 0; }
.ve-grow[data-level="2"] .ve-gcaret { color: var(--ve-g2-bar); }

/* Ebene 3: Kleinster Kopf (~0.82rem, 600), eingerückt ca. 24px, Outline/Unterstreichung, 3. Farbton.
   Ab Ebene 4 (.ve-grow.ve-grow-deep) dieselbe Gestalt; die Einrückung läuft je Ebene um 12px weiter (--ve-gind aus dem Skript). */
.ve-grow[data-level="3"], .ve-grow.ve-grow-deep {
  background: var(--ve-g3-bg);
  border-inline-start: 2px solid var(--ve-g3-bar);
  border-bottom: 1px dashed var(--ve-g3-border);
  color: var(--ve-g3-text);
  inset-inline-start: 24px;
  inset-inline-end: 0;
  left: 24px;
  right: 0;
}
[dir=rtl] .ve-grow[data-level="3"] { left: 0; right: 24px; }
.ve-grow.ve-grow-deep { inset-inline-start: var(--ve-gind, 36px); left: var(--ve-gind, 36px); }
[dir=rtl] .ve-grow.ve-grow-deep { left: 0; right: var(--ve-gind, 36px); }
.ve-grow[data-level="3"] .ve-ghead, .ve-grow.ve-grow-deep .ve-ghead { font-size: 0.82rem; }
.ve-grow[data-level="3"] .ve-glabel, .ve-grow.ve-grow-deep .ve-glabel { font-weight: 600; color: var(--ve-g3-text); }
.ve-grow[data-level="3"] .ve-gfield, .ve-grow.ve-grow-deep .ve-gfield { font-size: .74rem; font-weight: 500; color: var(--ve-g3-muted); flex-shrink: 0; }
.ve-grow[data-level="3"] .ve-gcaret, .ve-grow.ve-grow-deep .ve-gcaret { color: var(--ve-g3-bar); }

/* Dichte-Anpassungen */
html[data-density=compact] .ve-grow[data-level="1"] .ve-ghead { font-size: 0.94rem; }
html[data-density=compact] .ve-grow[data-level="2"] .ve-ghead { font-size: 0.86rem; }
html[data-density=compact] .ve-grow[data-level="3"] .ve-ghead, html[data-density=compact] .ve-grow.ve-grow-deep .ve-ghead { font-size: 0.78rem; }

html[data-density=comfortable] .ve-grow[data-level="1"] .ve-ghead { font-size: 1.0rem; }
html[data-density=comfortable] .ve-grow[data-level="2"] .ve-ghead { font-size: 0.9rem; }
html[data-density=comfortable] .ve-grow[data-level="3"] .ve-ghead, html[data-density=comfortable] .ve-grow.ve-grow-deep .ve-ghead { font-size: 0.82rem; }

/* Sticky-Stacking */
.ve-grow.is-sticky {
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
html[data-theme=dark] .ve-grow.is-sticky {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

/* Question answers (Versions-Explorer, 2026-10-17 18:00). :root uses
   color-scheme light dark, so a native textarea can paint black while the
   page theme is light, and the placeholder disappears. These controls follow
   the page theme in both themes. */
.ve-qa textarea[data-qa-explain],
.ve-qa input[data-qa-ev] {
  background: var(--bg-surface);
  color: var(--color-ink);
  border: 1px solid var(--border-default);
  color-scheme: light;
  caret-color: var(--color-ink);
}
.ve-qa textarea[data-qa-explain]::placeholder,
.ve-qa input[data-qa-ev]::placeholder {
  color: var(--color-ink-muted);
  opacity: 1;
}
[data-theme="dark"] .ve-qa textarea[data-qa-explain],
[data-theme="dark"] .ve-qa input[data-qa-ev] {
  color-scheme: dark;
}
