/* Stile, die nur einzelne Module brauchen. */

/* ---- Diagramme --------------------------------------------------------- */
.chart-host { width: 100%; min-height: 190px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font: 11px var(--font); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent-soft); stroke: none; }
.chart .dot { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.chart .bars rect { fill: var(--accent); }
.chart .avg { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 4; }

/* ---- Rechnungswesen-Trainer ---------------------------------------------- */
.trainer-start { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; }
.trainer-start__title { font-size: 24px; font-weight: 740; letter-spacing: -.015em; line-height: 1.15; }
.trainer-start .hero__sub { margin-top: 4px; }

.topic { align-items: flex-start; }
.topic .chip { margin-left: 4px; vertical-align: 1px; }
.topic__meter { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.topic__meter .bar { flex: 0 0 96px; height: 6px; }

.trainer-progress { display: grid; gap: 10px; font-size: 14px; color: var(--text-2); }
.trainer-progress .bar { height: 4px; }

.task__text { font-size: 16.5px; line-height: 1.5; }
.task__text p + p { margin-top: 10px; }
.task__text p:last-child:not(:first-child) { font-weight: 620; }
.task .table-wrap { margin-top: 14px; }

.answer + .answer { margin-top: 14px; }
.answer__feedback { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 620; }
.answer__feedback.ok { color: var(--ok); }
.answer__feedback.bad { color: var(--bad); }
.answer.is-right .field__box { border-color: var(--ok); }
.answer.is-wrong .field__box { border-color: var(--bad); }

.choices { display: grid; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.choice::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color .15s, box-shadow .15s;
}
.choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.choice[aria-checked="true"]::before { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--field), inset 0 0 0 9px var(--accent); }
.choice[disabled] { cursor: default; }
.choice.is-right { border-color: var(--ok); background: var(--ok-soft); }
.choice.is-right::before { border-color: var(--ok); box-shadow: inset 0 0 0 3px var(--field), inset 0 0 0 9px var(--ok); }
.choice.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.choice.is-wrong::before { border-color: var(--bad); box-shadow: inset 0 0 0 3px var(--field), inset 0 0 0 9px var(--bad); }

.calc { margin: 0; }
.calc__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
}
.calc__row dt { color: var(--text-2); }
.calc__row dd { margin: 0; text-align: right; font-weight: 620; }
.calc__row.is-strong dt, .calc__row.is-strong dd { color: var(--text); font-weight: 760; }
.calc__row.is-long { flex-direction: column; align-items: stretch; gap: 2px; }
.calc__text { margin: 10px 0; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.calc > :first-child { margin-top: 0; padding-top: 0; }
.calc > :last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }

.score { text-align: center; padding: 26px 16px; }
.score__value { font-size: 56px; font-weight: 760; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.score__label { margin-top: 6px; font-size: 15px; color: var(--text-2); }

/* ---- Technik-Werkzeuge ------------------------------------------------------ */
.qr-card { display: grid; place-items: center; padding: 20px; }
.qr { width: min(100%, 300px); border-radius: 10px; overflow: hidden; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }

.secret {
  margin: 6px 0 10px;
  font: 600 clamp(18px, 5.6vw, 24px)/1.35 var(--font-mono);
  letter-spacing: .02em;
  word-break: break-all;
  cursor: copy;
}

.output {
  padding: 2px 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  cursor: copy;
  max-height: 320px;
  overflow: auto;
}

.color-picker { flex: none; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line-strong); border-radius: 12px; background: none; cursor: pointer; }
.color-picker::-webkit-color-swatch-wrapper { padding: 4px; }
.color-picker::-webkit-color-swatch { border: 0; border-radius: 8px; }
.swatch { display: grid; place-items: center; min-height: 96px; border-radius: var(--radius); border: 1px solid var(--line); font: 700 20px var(--font-mono); letter-spacing: .04em; }
.contrast-demo { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); font-weight: 750; font-size: 18px; }
.shades { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.shade { height: 48px; border: 1px solid var(--line); border-radius: 8px; cursor: copy; padding: 0; }

/* ---- Server-Module ----------------------------------------------------------- */
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.dot--ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.dot--bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.list__value .chart { margin: 4px 0 0 auto; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }

.report__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.report__brand { font-family: var(--font-mark); font-size: 24px; line-height: 1.1; }
.report__meta { font-size: 13px; color: var(--text-2); }
.finding { align-items: flex-start; }
.finding__detail { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.finding__tip { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--text); }
.finding__tip::before { content: "Tipp: "; font-weight: 650; }
.report .results dd { word-break: break-word; }

@media print {
  :root, :root[data-theme="light"], :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #f1f1f1; --field: #fff; --line: #d8d8d8; --line-strong: #bbb;
    --text: #111; --text-2: #444; --text-3: #666; --accent: #c2410c; --accent-soft: #fff1ea; --accent-line: #e9b8a1;
    --ok: #1f6b2b; --ok-soft: #eaf5ec; --warn: #7a5200; --warn-soft: #fbf3df; --bad: #a3201a; --bad-soft: #fbeceb;
  }
  @page { margin: 14mm; }
  .report { font-size: 11pt; }
  .report .card, .report .hero { break-inside: avoid; border-color: #ccc; }
  .report .finding { break-inside: avoid; }
  .report .score__value { font-size: 44pt; }
  .report .chip { border: 1px solid currentColor; }
  .report .bar { border: 1px solid #ccc; }
  .report .bar > i, .report .chip, .report .hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .app .page > :not(.stack), .app .page > .stack > :not(.report) { display: none !important; }
  .app .page > .stack { display: block !important; }
}
