/* Report GenerATor – Gestaltung (AT Medical GmbH, 10/2026)
   Baut auf shared.css (Farben --ci-*, --acc) und design.css (.atmed-btn, .atmed-feld) auf.
   Keine Karten in Karten: Abschnitte stehen direkt auf der Seite, getrennt durch Linien. */

.rg-seite{min-width:0}
.rg-lead{color:var(--t-lo);margin:0 0 1.2em}

/* Reiter */
.rg-reiter{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px}
.rg-reiter a{display:inline-flex;align-items:center;min-height:36px;padding:7px 16px;border-radius:999px;
  border:1px solid var(--border,rgba(107,112,148,.2));color:var(--t-mid,#b0b5cc);text-decoration:none;font-size:14px;font-weight:600;
  transition:background .22s,border-color .22s,color .22s}
.legal-section .rg-reiter a{color:var(--t-mid,#b0b5cc)}
.rg-reiter a:hover{border-color:var(--border-h,rgba(107,112,148,.42));color:var(--t-hi,#eceef5);text-decoration:none}
.rg-reiter a[aria-current="page"],.legal-section .rg-reiter a[aria-current="page"]{background:var(--at-verlauf,linear-gradient(180deg,#5a80c0,#4a6fae 50%,#3a5b95));border-color:transparent;color:#fff}

.rg-entwurf{margin:0 0 18px}
.rg-entwurf p{margin:0;color:var(--t-hi,#eceef5)}
.rg-datenschutz{font-size:13px;color:var(--t-lo);margin:22px 0 0}

/* Übersicht */
.legal-section ul.rg-liste{list-style:none;padding:0;margin:0 0 10px;display:grid;gap:0}
.legal-section ul.rg-liste > li{padding:0;border-top:1px solid var(--border,rgba(107,112,148,.2))}
.legal-section ul.rg-liste > li::before{content:none}
.legal-section ul.rg-liste > li:last-child{border-bottom:1px solid var(--border,rgba(107,112,148,.2))}
.legal-section a.rg-liste-eintrag{display:grid;gap:4px;padding:16px 4px;text-decoration:none;color:var(--t-lo)}
.legal-section a.rg-liste-eintrag:hover{text-decoration:none;background:rgba(107,147,214,.06)}
.rg-liste-titel{font-weight:700;font-size:17px;color:var(--t-hi,#eceef5)}
.rg-liste-text{font-size:14.5px;line-height:1.6}
.rg-marke{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:6px;font-size:11.5px;font-weight:700;letter-spacing:.04em;
  text-transform:uppercase;color:#e9cf7d;border:1px solid rgba(233,207,125,.45);vertical-align:2px}

/* Bogen */
.rg-app{min-width:0}
.rg-laedt{color:var(--t-lo)}
.rg-layout{display:grid;gap:28px;min-width:0}
@media (min-width:1100px){
  .rg-layout{grid-template-columns:minmax(0,1fr) minmax(320px,380px);align-items:start}
  .rg-ausgabe{position:sticky;top:calc(var(--nav-h,72px) + 16px)}
}
.rg-formular{min-width:0}
.rg-abschnitt{margin:0 0 22px}
.legal-section h3.rg-abschnitt-titel{display:flex;align-items:center;gap:10px;margin:0 0 6px;font-size:12px;font-weight:700;
  letter-spacing:.09em;text-transform:uppercase;color:var(--ci-200,#b0b5cc)}
.legal-section h3.rg-abschnitt-titel::after{content:"";flex:1;height:1px;background:var(--border,rgba(107,112,148,.2))}
.rg-zeile{display:grid;grid-template-columns:minmax(150px,38%) minmax(0,1fr);gap:6px 14px;align-items:center;padding:6px 0;
  border-bottom:1px solid rgba(107,112,148,.12)}
.rg-zeile--mehr,.rg-zeile--lang{align-items:start}
.rg-label{font-size:14px;color:var(--ci-100,#d4d7e8);line-height:1.35}
.rg-steuer{min-width:0}
.rg-steuer .atmed-feld{width:100%;box-sizing:border-box}
/* Alle Felder gleich breit und bündig: Einheit steht innen rechts im Feld */
.rg-steuer--einheit{position:relative}
.rg-steuer--einheit .atmed-feld{padding-right:72px}
.rg-einheit{position:absolute;right:14px;top:0;height:var(--at-hoehe,44px);display:flex;align-items:center;font-size:13px;color:var(--t-lo);pointer-events:none}
.rg-steuer select.atmed-feld,.rg-steuer input.atmed-feld{min-height:var(--at-hoehe,44px)}
.rg-steuer textarea.atmed-feld{min-height:88px;resize:vertical}
.rg-chips{display:flex;flex-wrap:wrap;gap:6px 8px}
.rg-chips--spalten{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.rg-chip{display:inline-flex;align-items:center;gap:7px;padding:5px 12px 5px 9px;border-radius:10px;border:1px solid var(--border,rgba(107,112,148,.2));
  font-size:13.5px;line-height:1.3;color:var(--ci-100,#d4d7e8);cursor:pointer;background:rgba(9,11,18,.25)}
.rg-chip input{accent-color:#6b93d6;width:16px;height:16px;margin:0;flex:0 0 auto}
.rg-chip:has(input:checked){border-color:rgba(140,175,225,.62);background:rgba(107,147,214,.16)}
.rg-fuss{font-size:11px;color:var(--ci-400,#6b7094);letter-spacing:.04em;margin:8px 0 0}
.rg-hinweis-klein{font-size:12.5px;color:var(--t-lo);margin:6px 0 0;line-height:1.5}
.rg-unsichtbar{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Ausgabe */
.rg-ausgabe{min-width:0}
textarea.rg-befund{width:100%;box-sizing:border-box;min-height:220px;resize:vertical;font-size:14.5px;line-height:1.6}
.rg-knoepfe{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0 0}
.rg-status{font-size:13px;color:#8fd0a8}

/* Skizzen */
.rg-skizze{margin:14px 0 6px;padding:12px 0 0}
.rg-skizze-kopf{margin:0 0 8px}
.rg-skizze-raster{display:grid;gap:14px;min-width:0}
@media (min-width:760px){ .rg-skizze-raster{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start} }
.rg-buehne{min-width:0;color:var(--t-lo);font-size:13px}
.rg-svg{display:block;width:100%;height:auto;max-height:620px;-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.rg-skizze-seite{min-width:0}
.legal-section ol.rg-markierungen{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.legal-section ol.rg-markierungen > li{padding:0}
.legal-section ol.rg-markierungen > li::before{content:none}
.rg-markierung{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:6px 8px;align-items:center;font-size:13.5px;color:var(--ci-100,#d4d7e8)}
.rg-markierung .rg-ort{font-weight:600;color:var(--t-hi,#eceef5)}
.rg-markierung select,.rg-markierung input{grid-column:1 / -1;width:100%;box-sizing:border-box}
.rg-markierung .rg-weg{grid-column:3;grid-row:1;min-height:32px;padding:4px 12px}
.rg-nr{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 4px;box-sizing:border-box;border-radius:13px;background:#1f5fd6;border:2px solid #fff;color:#fff;font-weight:800;font-size:13px;font-variant-numeric:tabular-nums;box-shadow:0 1px 3px rgba(0,0,0,.4)}
.rg-skizze--segmente .rg-markierung{display:block}
.rg-leer{color:var(--t-lo)}

/* Skizzen auf dunklem Grund. Die SVG-Dateien bringen ein auf ihre ID beschränktes Stilblatt mit
   (Neuzeichnung 10.10.2026); hier werden nur die Farbvariablen für die dunkle Seite gesetzt.
   Beim Export als Bild fehlen diese Variablen, dann greifen die hellen Druckfarben der Datei. */
.rg-svg{--rg-text:#e4e8f3;--rg-text-leise:#a6adc4;--rg-kontur:rgba(205,214,230,.45);--rg-rippe:rgba(205,214,230,.16);
  --rg-flaeche:rgba(255,255,255,.07);--rg-flaeche-rand:rgba(255,255,255,.02);--rg-knochen:rgba(230,236,248,.2);
  --rg-grenze:rgba(230,236,248,.4);--rg-aktiv:#9fc0ff;--rg-schatten:rgba(0,0,0,.45);--rg-herz-linie:#0d0f17}
.rg-svg [data-region]{outline:none}
.rg-svg [data-region]:focus-visible{stroke:#9fc0ff!important;stroke-width:3!important;stroke-dasharray:none!important}
/* Markierungen: AT-Blau mit weißem Ring, auf jeder Füllfarbe lesbar */
.rg-svg .rg-marker circle{fill:#1f5fd6;stroke:#fff;stroke-width:2.5;filter:drop-shadow(0 1px 2px rgba(0,0,0,.55))}
.rg-svg .rg-marker text{fill:#fff;font-family:Inter,Arial,sans-serif;font-weight:800;text-anchor:middle;dominant-baseline:central}
.rg-svg .rg-marker--hervor circle{fill:#f0a020;stroke-width:3.5}
.legal-section ul.rg-legende{list-style:none;padding:0;margin:10px 0 0;display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px;color:var(--t-lo)}
.legal-section ul.rg-legende > li{padding:0;display:inline-flex;align-items:center;gap:6px}
.legal-section ul.rg-legende > li::before{content:none}
.rg-farbe{display:inline-block;width:14px;height:14px;border-radius:4px;border:1px solid rgba(205,214,230,.6);background:#d5e1f4}
.rg-zustand-hypo .rg-farbe{background:#f4cf5d}
.rg-zustand-akin .rg-farbe{background:#ec8550}
.rg-zustand-dysk .rg-farbe{background:#a855b5}
.rg-zustand-aneu .rg-farbe{background:#8e2f36}

/* Quellen */
.rg-quellen ul{font-size:14px}
.rg-quellen li{margin:0 0 .45em}

@media (max-width:600px){
  .rg-zeile{grid-template-columns:minmax(0,1fr);gap:6px}
  .rg-reiter a{padding:6px 13px;font-size:13.5px}
  .rg-knoepfe .atmed-btn{flex:1 1 auto}
}

/* Erweiterung 10.10.2026: Zuordnung, Bilder, Diktat, KI, Pilot, Schnittstelle */
.rg-pilot{margin:0 0 14px;padding:10px 14px;border-left:3px solid #6b93d6;background:rgba(107,147,214,.08);border-radius:0 10px 10px 0;color:var(--t-mid,#b0b5cc);font-size:14px}
.rg-pilot strong{color:var(--t-hi,#eceef5)}
.rg-warnung{margin:6px 0 0;font-size:12.5px;color:#f0b37a}
.rg-praxis-hilfe{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0 0}
.legal-section ul.rg-bilder{list-style:none;padding:0;margin:12px 0 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.legal-section ul.rg-bilder > li{padding:0}
.legal-section ul.rg-bilder > li::before{content:none}
.rg-bild{position:relative;border:1px solid var(--border,rgba(107,112,148,.2));border-radius:10px;overflow:hidden;background:#000}
.rg-bild img{display:block;width:100%;height:130px;object-fit:contain}
.rg-bild .rg-weg{position:absolute;top:6px;right:6px;min-height:30px;padding:2px 10px;background:rgba(13,15,23,.8)}
.rg-ki-box{margin:12px 0 0;padding:12px 14px;border:1px solid rgba(140,175,225,.35);border-radius:10px;background:rgba(107,147,214,.07)}
.legal-section .rg-ki-box h4{margin:0 0 6px;font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ci-200,#b0b5cc)}
.legal-section .rg-ki-box p{margin:0 0 8px}
.rg-ki-text{color:var(--t-hi,#eceef5);white-space:pre-wrap;font-size:14px}
.legal-section p.rg-ki-hinweis{font-size:12px;color:#e9cf7d;border-top:1px solid rgba(233,207,125,.3);padding-top:8px;margin:8px 0}
.rg-ki-gesetzt{border-color:rgba(233,207,125,.8)!important;box-shadow:0 0 0 2px rgba(233,207,125,.25)!important}
/* Marke unter einem von der KI gesetzten Feld: Rohwert sichtbar, Aufforderung zum Prüfen */
.rg-ki-marke{display:inline-block;margin:5px 0 0;padding:1px 8px;border-radius:6px;font-size:12px;font-weight:600;letter-spacing:.02em;
  color:#e9cf7d;border:1px solid rgba(233,207,125,.5);background:rgba(233,207,125,.08);line-height:1.6}
.rg-steuer--einheit .rg-ki-marke{position:relative;z-index:1}
.legal-section .rg-ki-box p.rg-warnung{font-size:13px;color:#f0b37a;border-left:3px solid #f0b37a;padding:4px 0 4px 10px;margin:4px 0 10px}
.rg-ergaenzung-kopf{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0 6px}
textarea.rg-ergaenzung{width:100%;box-sizing:border-box;min-height:84px;resize:vertical}
.rg-diktat[aria-pressed="true"]{border-color:#e05a4f;color:#fff;background:rgba(224,90,79,.35)}
.rg-knoepfe--haupt .atmed-btn{flex:1 1 auto}
.rg-knoepfe--ki{border-top:1px solid var(--border,rgba(107,112,148,.2));padding-top:12px;margin-top:14px}
.rg-chip--klein{padding:4px 10px 4px 8px;font-size:13px}
.rg-abschnitt--kopf .rg-zeile:last-child{border-bottom:0}
.legal-section pre.rg-code,.rg-api pre{white-space:pre-wrap;word-break:break-word;font:13px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:rgba(9,11,18,.55);border:1px solid var(--border,rgba(107,112,148,.2));border-radius:10px;padding:12px 14px;color:var(--ci-100,#d4d7e8);margin:0 0 14px}
.rg-api code{font-size:13px;color:#cfe0ff;word-break:break-word}
@media (max-width:600px){
  /* Hauptknöpfe: die beiden blauen in voller Breite (lange Beschriftung bricht sonst um), die drei weiteren in einer Reihe */
  .rg-knoepfe--haupt .atmed-btn{flex:1 1 calc(33.333% - 7px);padding-left:10px;padding-right:10px;white-space:nowrap}
  .rg-knoepfe--haupt .atmed-btn--primary{flex:1 1 100%}
  .rg-bild img{height:110px}
}

/* Neuzeichnung, 3D-Modell und Messwerte (10.10.2026) */
.rg-skizze-kopf{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px 16px}
.rg-skizze-kopf > .rg-label,.rg-skizze-kopf > .rg-hinweis-klein{flex:1 1 100%}
.rg-ansicht-wahl{display:inline-flex;border:1px solid var(--border,rgba(107,112,148,.3));border-radius:999px;padding:3px;gap:2px;background:rgba(9,11,18,.35)}
.rg-ansicht-knopf{appearance:none;border:0;background:transparent;color:var(--t-mid,#b0b5cc);font:600 13.5px/1 Inter,system-ui,sans-serif;padding:9px 16px;border-radius:999px;cursor:pointer;min-height:36px}
.rg-ansicht-knopf[aria-pressed="true"]{background:var(--at-verlauf,linear-gradient(180deg,#5a80c0,#4a6fae 50%,#3a5b95));color:#fff}
.rg-ansicht-knopf:disabled{opacity:.45;cursor:not-allowed}
.rg-ansicht-knopf:focus-visible,.rg3d-knopf:focus-visible{outline:2px solid #9fc0ff;outline-offset:2px}
.rg-buehne--verborgen{position:absolute!important;left:-10000px;top:0;width:640px;visibility:hidden;pointer-events:none}
.rg-skizze-raster--3d{position:relative}
@media (min-width:760px){ .rg-skizze-raster--3d{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)} }
.rg3d{position:relative;min-width:0;height:clamp(440px,72vh,700px);border-radius:16px;overflow:hidden;
  background:radial-gradient(120% 90% at 50% 18%,#2a3350 0%,#151a2a 55%,#0b0e17 100%);border:1px solid var(--border,rgba(107,112,148,.25))}
.rg3d-flaeche{position:absolute;inset:0}
.rg3d-leinwand{display:block;touch-action:none;cursor:grab;outline:none;-webkit-tap-highlight-color:transparent}
.rg3d-leinwand:active{cursor:grabbing}
.rg3d-laedt{position:absolute;left:0;right:0;top:45%;text-align:center;margin:0;color:var(--t-lo);font-size:14px}
.rg3d-hinweis{position:absolute;left:12px;right:12px;top:10px;margin:0;font-size:12px;line-height:1.4;color:rgba(220,226,240,.72);pointer-events:none;transition:color .2s}
.rg3d-hinweis--betont{color:#ffd27a}
.rg3d-tipp{position:absolute;z-index:2;padding:4px 10px;border-radius:8px;background:rgba(10,13,22,.88);border:1px solid rgba(159,192,255,.45);color:#fff;font-size:13px;font-weight:600;white-space:nowrap;pointer-events:none}
.rg3d-werkzeug{position:absolute;left:8px;right:8px;bottom:8px;display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.rg3d-gruppe{display:inline-flex;gap:2px;padding:3px;border-radius:12px;background:rgba(10,13,22,.72);border:1px solid rgba(205,214,230,.16);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.rg3d-knopf{appearance:none;border:0;background:transparent;color:#e4e8f3;font:600 13px/1 Inter,system-ui,sans-serif;min-width:40px;min-height:36px;padding:0 10px;border-radius:9px;cursor:pointer}
.rg3d-knopf:hover{background:rgba(107,147,214,.22)}
.rg3d-knopf[aria-pressed="true"]{background:#3a5b95;color:#fff}
.legal-section ol.rg-markierungen--leer + .rg-knoepfe{margin-top:0}
.rg-plausi{display:block;margin:5px 0 0;font-size:12.5px;color:#f0b37a}
.rg-zahl--pruefen{border-color:rgba(240,179,122,.85)!important}
input.rg-zahl{font-variant-numeric:tabular-nums}
/* Messwerte auf einen Blick */
.rg-messwerte{margin:12px 0 0;border:1px solid var(--border,rgba(107,112,148,.25));border-radius:12px;background:rgba(9,11,18,.3)}
.rg-messwerte > summary{cursor:pointer;padding:10px 14px;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ci-200,#b0b5cc);list-style-position:inside}
.rg-mess{width:100%;border-collapse:collapse;font-size:13.5px}
.rg-mess th,.rg-mess td{padding:6px 10px;border-top:1px solid rgba(107,112,148,.16);text-align:left;vertical-align:top}
.rg-mess th[scope="row"]{font-weight:600;color:var(--ci-100,#d4d7e8)}
.rg-mess tr.rg-mess-gruppe th{padding-top:10px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ci-300,#8b90aa);border-top:0}
.rg-mess tr.rg-mess-abgeleitet th{padding-left:22px;font-weight:500;color:var(--t-lo)}
.rg-mess td.rg-mess-wert{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:700;color:var(--t-hi,#eceef5)}
.rg-mess-einheit{font-weight:500;color:var(--t-lo)}
.rg-mess-bew{display:inline-block;padding:1px 8px;border-radius:6px;font-size:12px;line-height:1.55;color:var(--t-mid,#b0b5cc);background:rgba(107,147,214,.1)}
.rg-mess-bew--auff{color:#ffd29a;background:rgba(240,160,60,.16);border:1px solid rgba(240,160,60,.4)}
.rg-mess-bew--norm{color:#9fe0b6;background:rgba(80,190,120,.12);border:1px solid rgba(80,190,120,.35)}
@media (max-width:600px){
  .rg3d{height:clamp(420px,68vh,560px);border-radius:12px}
  .rg3d-knopf{min-width:38px;padding:0 8px;font-size:12.5px}
  .rg3d-hinweis{font-size:11.5px}
  .rg-mess tr:not(.rg-mess-gruppe){display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px}
  .rg-mess tr:not(.rg-mess-gruppe) td:last-child{grid-column:1 / -1;padding-top:0}
  .rg-mess tr:not(.rg-mess-gruppe) td:last-child:empty{display:none}
  .rg-mess th,.rg-mess td{border-top:0}
  .rg-mess tr:not(.rg-mess-gruppe){border-top:1px solid rgba(107,112,148,.16)}
}
