/* ==========================================================================
   AXR-Systems — DSGVO-Schnellcheck.

   Ergänzt ki-check.css. Die Assistenten-Optik (Fortschritt, Antwortkarten,
   Ring, Bereichsbalken) kommt vollständig von dort — hier steht nur, was
   fachlich eigen ist: die Ampel und die Maßnahmenliste.

   Wichtig für die Farbwahl: Bei den anderen Werkzeugen ist ein hoher Wert
   gut. Hier ist er schlecht. Die Ampel ist deshalb bewusst kräftig und
   unmissverständlich — ein Markenverlauf über dem Ring würde ein hohes
   Risiko wie einen Erfolg aussehen lassen.
   ========================================================================== */

.ax-dsg {
  --dsg-gruen: #059669;
  --dsg-gelb: #ca8a04;
  --dsg-orange: #ea580c;
  --dsg-rot: #dc2626;
}
[data-theme="dark"] .ax-dsg,
[data-theme="dark"] .ax-dsg-row {
  --dsg-gruen: #34d399;
  --dsg-gelb: #facc15;
  --dsg-orange: #fb923c;
  --dsg-rot: #f87171;
}

/* Ring: Farbe nach Stufe statt Markenverlauf. */
.ax-dsg-gauge.is-gruen .ax-kic-arc { stroke: var(--dsg-gruen); }
.ax-dsg-gauge.is-gelb .ax-kic-arc { stroke: var(--dsg-gelb); }
.ax-dsg-gauge.is-orange .ax-kic-arc { stroke: var(--dsg-orange); }
.ax-dsg-gauge.is-rot .ax-kic-arc { stroke: var(--dsg-rot); }

.ax-dsg-level.is-gruen { color: var(--dsg-gruen); }
.ax-dsg-level.is-gelb { color: var(--dsg-gelb); }
.ax-dsg-level.is-orange { color: var(--dsg-orange); }
.ax-dsg-level.is-rot { color: var(--dsg-rot); }

/* --------------------------------------------------------------------------
   Bereiche im Ergebnis
   Die Karten selbst (.ax-area-*) stehen in ki-check.css, die dieses Werkzeug
   ohnehin lädt — dieselbe Darstellung wie im KI-Check, nur einmal definiert.
   Hier bleibt allein die Zuordnung der Ampelfarben: Die Karte liest ihre
   Akzentfarbe aus --area-ton, gesetzt in dsgvo.js.
   -------------------------------------------------------------------------- */
.ax-dsg-areas { margin-top: 1.9rem; }

.ax-dsg-h {
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem;
  color: var(--ink); margin: 0 0 .5rem; letter-spacing: -.01em;
}
.ax-dsg-note { margin: 0 0 .9rem; font-size: .88rem; color: var(--muted); }

/* Maßnahmenliste */
.ax-dsg-todos { margin-top: 1.9rem; }
.ax-dsg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; counter-reset: none; }
.ax-dsg-item {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  transition: border-color .18s, transform .18s var(--ease);
}
.ax-dsg-item:hover { border-color: color-mix(in srgb, var(--brand-2) 40%, var(--line)); transform: translateX(2px); }
.ax-dsg-n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; margin-top: .1em;
  background: var(--brand-grad); color: #fff;
  font-size: .76rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.ax-dsg-tx { font-size: .93rem; line-height: 1.62; color: var(--ink-2); }

/* Rechtlicher Hinweis — im Ergebnis sichtbar, nicht weggeklappt. */
.ax-dsg-disclaim {
  margin: 1.4rem 0 0; padding: .85rem 1rem;
  border-left: 3px solid color-mix(in srgb, var(--muted) 55%, transparent);
  background: color-mix(in srgb, var(--line) 30%, transparent);
  border-radius: 0 var(--r-sm, 10px) var(--r-sm, 10px) 0;
  font-size: .84rem; line-height: 1.6; color: var(--ink-2);
}

/* Derselbe Hinweis unter dem Werkzeug, für alle, die nicht bis zum Ergebnis kommen. */
.ax-dsg-hinweis {
  max-width: var(--measure); margin: 1.2rem auto 0;
  padding: .9rem 1.1rem;
  border: 1px dashed color-mix(in srgb, var(--line) 95%, transparent);
  border-radius: var(--r-sm, 10px);
  font-size: .86rem; line-height: 1.62; color: var(--muted);
}

.ax-dsg-cta { margin-top: 1.6rem; }

/* Punkt in der Stufentabelle statt Buchstabe: Bei einer Ampel ist die Farbe
   die Information — ein Buchstabe daneben wäre doppelt gemoppelt. */
.ax-dsg-dot {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}
.ax-dsg-dot.is-gruen { background: var(--dsg-gruen, #059669); color: var(--dsg-gruen, #059669); }
.ax-dsg-dot.is-gelb { background: var(--dsg-gelb, #ca8a04); color: var(--dsg-gelb, #ca8a04); }
.ax-dsg-dot.is-orange { background: var(--dsg-orange, #ea580c); color: var(--dsg-orange, #ea580c); }
.ax-dsg-dot.is-rot { background: var(--dsg-rot, #dc2626); color: var(--dsg-rot, #dc2626); }

@media (max-width: 620px) {
  .ax-dsg-item { padding: .75rem .85rem; }
  .ax-dsg-tx { font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ax-dsg-item { transition: none !important; }
  .ax-dsg-item:hover { transform: none; }
}

/* ============================================================
   Ergebnis-Ausbau (1.9.6): Rechtsbezug, Aufwandsmarken,
   Effekt-Rechnung, Antwortübersicht, Drucken.
   ============================================================ */

/* Rechtsbezug je Bereich */
.ax-dsg-art {
	display: block; margin-top: .6rem; padding-top: .55rem;
	border-top: 1px dashed var(--line);
	font-size: .78rem; line-height: 1.5; color: var(--muted);
}
.ax-dsg-art b { color: var(--ink-2); font-weight: 600; }

/* Maßnahmen: Text plus Marken für Aufwand und Bereich */
.ax-dsg-body { display: block; }
.ax-dsg-marken { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.ax-dsg-mark {
	display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 999px;
	font-size: .74rem; font-weight: 600; line-height: 1.45;
	background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted);
}
.ax-dsg-mark.is-klein  { background: color-mix(in srgb, var(--dsg-gruen, #059669) 14%, transparent); color: var(--dsg-gruen, #059669); }
.ax-dsg-mark.is-mittel { background: color-mix(in srgb, var(--dsg-gelb, #ca8a04) 16%, transparent); color: var(--dsg-gelb, #ca8a04); }
.ax-dsg-mark.is-gross  { background: color-mix(in srgb, var(--dsg-orange, #ea580c) 14%, transparent); color: var(--dsg-orange, #ea580c); }

/* Was die ersten drei Punkte bringen */
.ax-dsg-effekt {
	margin-top: 1.2rem; padding: 1.1rem 1.2rem; border-radius: 16px;
	background: color-mix(in srgb, var(--brand-2) 7%, var(--surface));
	border: 1px solid color-mix(in srgb, var(--brand-2) 22%, var(--line));
}
.ax-dsg-effekt .ax-dsg-h { margin-bottom: .5rem; }
.ax-dsg-effekt .ax-dsg-note { margin: 0; }
.ax-dsg-effekt-bal { display: flex; align-items: baseline; gap: .7rem; margin: .2rem 0 .7rem; }
.ax-dsg-effekt-jetzt, .ax-dsg-effekt-ziel {
	font-family: var(--font-head); font-weight: 700; line-height: 1;
	font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
}
.ax-dsg-effekt-jetzt { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.ax-dsg-effekt-ziel  { color: var(--dsg-gruen, #059669); }
.ax-dsg-effekt-pfeil { color: var(--muted); font-size: 1.1rem; }

/* Antwortübersicht */
.ax-dsg-antworten { margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.ax-dsg-antworten > summary {
	cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .5rem;
	font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--ink);
	min-height: 44px;
}
.ax-dsg-antworten > summary::-webkit-details-marker { display: none; }
.ax-dsg-antworten > summary::marker { content: ""; }
.ax-dsg-antworten > summary::after {
	content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
	transform: rotate(45deg); transition: transform .2s var(--ease);
}
.ax-dsg-antworten[open] > summary::after { transform: rotate(-135deg); }
.ax-dsg-alist { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; counter-reset: aw; }
.ax-dsg-alist li {
	display: grid; gap: .15rem; padding: .7rem .9rem; border-radius: 12px;
	background: var(--surface-2); border: 1px solid var(--line);
}
.ax-dsg-af { font-size: .84rem; color: var(--muted); line-height: 1.45; }
.ax-dsg-aa { font-size: .9rem; font-weight: 600; line-height: 1.45; }
.ax-dsg-aa.is-gruen  { color: var(--dsg-gruen, #059669); }
.ax-dsg-aa.is-gelb   { color: var(--dsg-gelb, #ca8a04); }
.ax-dsg-aa.is-orange { color: var(--dsg-orange, #ea580c); }
.ax-dsg-aa.is-rot    { color: var(--dsg-rot, #dc2626); }

/* Ausdruck: das Ergebnis, nichts sonst — und die Antworten aufgeklappt. */
@media print {
	.site-header, .site-footer, .ax-kic-nav, .ax-dsg-cta, .ax-sc-cta,
	.ax-d24, #wpadminbar, .ax-kic-static { display: none !important; }
	.ax-dsg-antworten { display: block !important; }
	.ax-dsg-antworten > summary { display: none; }
	.ax-dsg-alist { display: grid !important; }
	.ax-kic, .ax-area, .ax-dsg-item, .ax-dsg-effekt { break-inside: avoid; box-shadow: none !important; }
	.ax-dsg-disclaim { border: 1px solid #999; padding: .6rem; }
}

/* Auf schmalen Geräten braucht die Wertespalte der Bereichskarte eine eigene
   Zeile: „67 % · 6 von 9 Punkten · Gewicht 32 %" passt neben dem Bereichsnamen
   nicht mehr und lief vorher über den Kartenrand hinaus. */
@media (max-width: 560px) {
	.ax-dsg .ax-area-vals { flex: 1 1 100%; flex-wrap: wrap; gap: .1rem .5rem; }
	.ax-dsg .ax-area-w { white-space: normal; letter-spacing: .02em; }
}

/* Der Fokus springt nach dem Auswerten programmgesteuert auf die Stufe, damit
   Screenreader das Ergebnis vorlesen. Ein Rahmen gehört dort nur hin, wenn
   jemand tatsächlich mit der Tastatur navigiert. */
.ax-dsg .ax-kic-level:focus { outline: none; }
