/* aiat-barrierefrei-engine dashboard styles — vendored (air-gapped, no CDN).
   WCAG 2.1 AA: AA-contrast tokens (documented inline), ≥48px targets, icon+text status,
   reduced-motion safe. The engine's own UI is the on-brand bar for an a11y-remediation tool. */
:root {
  --fg: #1a1a1a;        /* ~16:1 on white */
  --muted: #595959;     /* 7:1 on white  */
  --bg: #ffffff;
  --border: #c4c4c4;
  --accent: #0b5fb0;    /* link/focus — 5.3:1 on white */
  --accent-fg: #ffffff;
  --pass-bg: #d8f5d8; --pass-fg: #0b6b1f;  /* 5.2:1 */
  --fail-bg: #fbe0e0; --fail-fg: #a01818;  /* 6.0:1 */
  --warn-bg: #fdf0cd; --warn-fg: #6b4e00;  /* 6.4:1 — judge findings / review badges */
}
* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 760px; margin: 0 auto; padding: 2rem 1rem 4rem;
  color: var(--fg); background: var(--bg); line-height: 1.5;
}
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
.muted { color: var(--muted); font-size: .9rem; }
a.link { color: var(--accent); }
a.link:hover { text-decoration: none; }

/* Skip link — first focusable element (WCAG 2.4.1) */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--fg); color: var(--accent-fg);
  padding: .5rem .9rem; border-radius: 0 0 .4rem 0; z-index: 10;
}
.skip-link:focus { left: 0; }

/* Visible focus indicator on every interactive element (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
/* Result heading / alert receive focus after swap (tabindex=-1) — keep a visible ring. */
[data-result-focus]:focus-visible, [data-result-focus]:focus {
  outline: 3px solid var(--accent); outline-offset: 4px;
}

.card { border: 1px solid var(--border); border-radius: .6rem; padding: 1.25rem; margin-top: 1.25rem; }

label { display: block; font-weight: 600; margin-bottom: .4rem; }
input[type="file"], input[type="url"] {
  display: block; width: 100%; padding: .6rem; min-height: 48px;
  border: 1px solid var(--border); border-radius: .4rem; background: #fff;
}
.help { margin: .4rem 0 1rem; }
button {
  min-height: 48px; min-width: 48px; padding: .6rem 1.2rem;
  border: 0; border-radius: .4rem; background: var(--fg); color: var(--accent-fg);
  font-size: 1rem; font-weight: 600; cursor: pointer;
}
button:hover { background: #000; }

/* --- (a) Upload: fieldset groups the mutually-exclusive file/URL inputs --- */
.upload-fieldset { border: 1px solid var(--border); border-radius: .6rem; padding: 1rem 1.25rem; margin: 0; }
.upload-fieldset legend { font-weight: 600; padding: 0 .4rem; }
.upload-or { text-align: center; margin: 1rem 0; font-weight: 600; }

/* --- (a2) Task selector — same card/fieldset look as .upload-fieldset, native radios.
   Each option is a 48px-min tappable row; selection cue is border+bg (NOT colour alone,
   WCAG 1.4.1) plus the checked radio dot itself. --- */
.task-fieldset { border: 1px solid var(--border); border-radius: .6rem;
                 padding: 1rem 1.25rem; margin: 1.25rem 0 0; }
.task-fieldset legend { font-weight: 600; padding: 0 .4rem; }

.task-option { display: flex; align-items: flex-start; gap: .6rem;
               border: 1px solid var(--border); border-radius: .5rem;
               padding: .75rem; margin: 0 0 .6rem; background: #fff; }
.task-option:last-of-type { margin-bottom: .75rem; }
/* Native radio kept large enough to comfortably hit; row stays ≥48px tall. */
.task-option input[type="radio"] { width: 1.3rem; height: 1.3rem; margin: .1rem 0 0;
                                   flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
/* Whole label clickable; reset the global label block/weight inside the row. */
.task-option label { display: block; margin: 0; font-weight: 600;
                     min-height: 1.5rem; cursor: pointer; }
.task-option__desc { display: block; font-weight: 400; margin-top: .15rem; }
/* Selected state: border + background, in addition to the radio dot (colour-not-alone). */
.task-option:has(input[type="radio"]:checked) { border-color: var(--accent); background: #eef4fb; }
/* Visible focus ring on the whole row when the native radio is focused. */
.task-option:has(input[type="radio"]:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Dropzone is a visual wrapper; the native input inside it stays the real, focusable control. */
.dropzone { position: relative; border: 2px dashed var(--border); border-radius: .5rem;
            padding: 1rem; background: #fff; }
.dropzone input[type="file"] { min-height: 48px; }
.dropzone__hint { margin: .5rem 0 0; font-size: .9rem; color: var(--muted); }
/* dragover feedback uses border + bg, NOT colour alone (WCAG 1.4.1). */
.dropzone.is-dragover { border-color: var(--accent); background: #eef4fb; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
            overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.badge { display: inline-flex; align-items: center; gap: .4rem;
         padding: .3rem .7rem; border-radius: .4rem; font-weight: 700; margin: 0 0 1rem; }
.badge--pass { background: var(--pass-bg); color: var(--pass-fg); }
.badge--fail { background: var(--fail-bg); color: var(--fail-fg); }
.badge--warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge--neutral { background: #eef1f4; color: var(--muted); border: 1px solid var(--border); }
.badge__icon { font-size: 1.1em; }

/* Before/after remediation panel: two stacked columns on mobile, side-by-side ≥ 32rem. */
.ba { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 0 0 1rem; }
.ba__col { border: 1px solid var(--border); border-radius: .5rem; padding: 1rem; }
.ba__label { margin: 0 0 .5rem; font-size: .85rem; font-weight: 700;
             text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.ba__col .badge { margin: 0 0 .5rem; }
.ba__stat { margin: 0; font-variant-numeric: tabular-nums; }
.ba__col--after.ba__col--pass { border: 2px solid var(--pass-fg); background: var(--pass-bg); }
.ba__arrow { display: none; }
@media (min-width: 32rem) {
  .ba { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .ba__arrow { display: block; text-align: center; font-size: 1.4rem;
               font-weight: 700; color: var(--muted); }
}

/* Download CTA: an <a> styled as a primary button (navigation to a resource). */
.btn-download {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; min-width: 48px; padding: .7rem 1.2rem;
  border-radius: .4rem; background: var(--accent); color: var(--accent-fg);
  font-size: 1rem; font-weight: 700; text-decoration: none;
}
.btn-download:hover { background: #094e91; text-decoration: none; }
/* #502 Top-Action-Bar: `.result__download-pdf` is shared by BOTH this static download <p>
   and the JS-injected "Vorlesen wie ein Screenreader" <p> (app.js #149) that is inserted
   `afterend` it (same class, see app.js `injectSpokenViewLink`). `inline-flex` lets the two
   same-class <p>s sit side-by-side as ONE action bar — no wrapping container element, so
   app.js's `anchorBlock.parentNode === article` DOM-adjacency check keeps working unchanged.
   Wraps to a second line on narrow viewports (inline-level boxes wrap like text). */
.result__download-pdf { display: inline-flex; margin: 1rem .75rem .5rem 0; }

.mode { display: inline-block; padding: .15rem .5rem; border-radius: .3rem;
        border: 1px solid var(--border); font-weight: 600; font-size: .85rem; }

.result__summary { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; margin: 0 0 1rem; }
.result__row { display: contents; }
.result__summary dt { color: var(--muted); }
.result__summary dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }

.rules { list-style: none; padding: 0; margin: .5rem 0 0; }
.rule { border-top: 1px solid var(--border); padding: .6rem 0; }
.rule__clause { margin: 0 0 .2rem; font-weight: 600; }
.rule__desc { margin: 0 0 .2rem; }
.rule__pages { margin: 0; }

/* (4) OCR degrade / rate-limit note — non-colour: icon + "Hinweis" + left border. */
.ocr-note { display: flex; gap: .5rem; align-items: flex-start;
            border: 1px solid var(--border); border-left-width: 4px; border-left-color: var(--accent);
            border-radius: .4rem; padding: .75rem 1rem; margin: 0 0 1rem; background: #eef4fb; }
.ocr-note__icon { font-size: 1.2em; line-height: 1.4; }
.ocr-note p { margin: 0; }

/* --- (b) HTMX busy indicator: hidden by default, shown only while in flight. --- */
#busy { display: none; }
#busy.htmx-request { display: block; }
.spinner { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em;
           border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%;
           animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- (d) BYOK / Admin key inputs --- */
.cost-note { display: flex; gap: .5rem; align-items: flex-start;
             border: 1px solid var(--fail-fg); border-left-width: 4px; border-radius: .4rem;
             padding: .75rem 1rem; margin: 0 0 1.25rem; background: #fff7f3; }
.cost-note__icon { font-size: 1.2em; line-height: 1.4; }
.cost-note p { margin: 0; }

.key-group { margin: 0 0 1.25rem; }
.key-field { display: flex; gap: .5rem; align-items: stretch; }
.key-field input { flex: 1; min-height: 48px; padding: .6rem;
                   border: 1px solid var(--border); border-radius: .4rem; font-family: monospace; }
/* 48×48 minimum target (WCAG 2.5.8). */
.key-toggle { min-height: 48px; min-width: 48px; display: inline-flex; gap: .35rem;
              align-items: center; padding: .5rem .8rem; border: 1px solid var(--border);
              border-radius: .4rem; background: #fff; color: var(--fg); cursor: pointer; }
.key-toggle:hover { background: #f2f2f2; }
.key-toggle[aria-pressed="true"] { background: #eef4fb; border-color: var(--accent); }

/* --- (e) Error fragment --- */
.error-text { color: var(--fail-fg); font-weight: 600; margin: .4rem 0 0; }
[aria-invalid="true"] { outline: 2px solid var(--fail-fg); outline-offset: 1px; }

/* --- (f) Async-job progress (#67/#6) — self-polling _queued.html fragment. --- */
.progress { width: 100%; height: .6rem; margin: .75rem 0; border: 1px solid var(--border);
            border-radius: .4rem; background: #eef1f4; overflow: hidden; }
.progress__bar { height: 100%; background: var(--accent); transition: width .4s ease; }

/* --- Deep Session O: Accessibility scorecard + dual-gate verdict (ADR-007).
   ZERO new colour tokens — reuses --pass/--fail/--accent/--muted. Status is conveyed by
   icon + text + shape, never colour alone (WCAG 1.4.1). Reduced-motion safe (meters use
   the global transition kill below). Responsive 375 / 768 / 1280. --- */

/* Dual-gate verdict block. Left-border shape cue is in ADDITION to the badge icon + word,
   so the three states are distinguishable without colour. */
.scorecard__verdict { border: 1px solid var(--border); border-left-width: 4px;
                      border-radius: .5rem; padding: 1rem 1.25rem; margin: 1.25rem 0 0; }
.scorecard__verdict .result__subheading { margin-top: 0; }
.scorecard__verdict--pass    { border-left-color: var(--pass-fg); background: var(--pass-bg); }
.scorecard__verdict--fail    { border-left-color: var(--fail-fg); background: var(--fail-bg); }
.scorecard__verdict--neutral { border-left-color: var(--muted);   background: #eef1f4; }
.scorecard__verdict-badge { font-size: 1.05rem; margin: 0 0 .5rem; }
.scorecard__verdict-reason { margin: 0 0 .5rem; font-weight: 600; }
.scorecard__verdict-note { margin: 0; }

/* #501/#502 — Result-Page-IA consolidation: the dual-gate verdict is now the ONE primary
   verdict, so it leads visually (bigger badge, more padding, thicker left-border) with the
   3-Stufen-Verdikt nested underneath as its Unterzeile (layout-only — wording/reducer are
   untouched, see _scorecard.html). ZERO new colour tokens. */
.scorecard__verdict-group { margin: 1.25rem 0 0; }
.scorecard__verdict-group .scorecard__verdict,
.scorecard__verdict-group .scorecard__stage { margin-top: 0; }
.scorecard__verdict--lead { border-left-width: 6px; padding: 1.25rem 1.5rem; }
.scorecard__verdict--lead .scorecard__verdict-badge { font-size: 1.3rem; padding: .45rem 1rem; }
/* Sub-line: visually nested under the lead verdict (indent + thinner border + smaller
   heading) so it reads as "part of" the verdict above, not a second co-equal panel. */
.scorecard__stage--sub { margin: .5rem 0 0 1rem; border-left-width: 3px;
                         padding: .75rem 1rem; }
.scorecard__stage-heading { margin: 0 0 .4rem; font-size: .85rem;
                            text-transform: uppercase; letter-spacing: .03em;
                            color: var(--muted); }

/* Scorecard card. */
.scorecard { border: 1px solid var(--border); border-radius: .6rem;
             padding: 1.25rem; margin: 1.25rem 0 0; }
.scorecard .result__subheading { margin-top: 0; }

/* Composite headline: big number + BITV band word. Wraps on narrow viewports. */
.scorecard__headline { display: flex; flex-wrap: wrap; align-items: baseline;
                       gap: .5rem 1rem; margin: 0 0 .5rem; }
.scorecard__composite { margin: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.scorecard__composite-num { font-size: 2.6rem; font-weight: 800; }
.scorecard__composite-denom { font-size: 1.1rem; font-weight: 600; color: var(--muted); margin-left: .15rem; }
/* Band word: icon + text + colour. The icon (✓/△) + word carry meaning without colour. */
.scorecard__band { display: inline-flex; align-items: center; gap: .35rem;
                   margin: 0; font-weight: 700; font-size: 1.05rem; }
.scorecard__band-icon { font-size: 1.1em; }
.scorecard__band--high .scorecard__band-word { color: var(--pass-fg); }
.scorecard__band--ok   .scorecard__band-word { color: var(--pass-fg); }
.scorecard__band--low  .scorecard__band-word { color: var(--fail-fg); }

/* Composite meter — the fill width encodes the score; the number above is authoritative. */
.scorecard__meter { width: 100%; height: .7rem; margin: 0 0 .75rem;
                    border: 1px solid var(--border); border-radius: .4rem;
                    background: #eef1f4; overflow: hidden; }
.scorecard__meter-fill { display: block; height: 100%; background: var(--accent); }

/* Honest coverage + provisional warning + provenance. */
.scorecard__coverage { margin: 0 0 .35rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.scorecard__provisional { display: flex; gap: .5rem; align-items: flex-start;
                          border: 1px solid var(--fail-fg); border-left-width: 4px;
                          border-radius: .4rem; padding: .6rem .9rem; margin: 0 0 .5rem;
                          background: #fff7f3; }
.scorecard__provisional-icon { font-size: 1.15em; line-height: 1.4; }
.scorecard__provenance { margin: 0 0 1rem; }

/* Per-dimension breakdown. */
.scorecard__dims-heading { font-size: .95rem; margin: 0 0 .5rem; }
.scorecard__dims { list-style: none; padding: 0; margin: 0; }
.scorecard__dim { border-top: 1px solid var(--border); padding: .65rem 0; }
/* Abstained rows are de-emphasised but never hidden — the "nicht geprüft" text is the signal. */
.scorecard__dim--abstained { opacity: .9; }
.scorecard__dim-head { display: flex; flex-wrap: wrap; align-items: baseline;
                       gap: .3rem .6rem; }
.scorecard__dim-name { font-weight: 600; flex: 1 1 12rem; }
.scorecard__dim-weight { font-variant-numeric: tabular-nums; }
/* Tier token: bordered pill carrying a German word (deterministisch / KI / manuell).
   Distinguished by text + border, not colour alone. */
.scorecard__tier { display: inline-block; padding: .1rem .5rem; border-radius: .3rem;
                   border: 1px solid var(--border); font-size: .8rem; font-weight: 700;
                   white-space: nowrap; }
.scorecard__tier--a { background: #eef4fb; border-color: var(--accent); color: var(--accent); }
.scorecard__tier--b { background: #fff; color: var(--fg); }
.scorecard__tier--c { background: #f2f2f2; color: var(--muted); }
.scorecard__dim-score { font-variant-numeric: tabular-nums; font-weight: 700;
                        margin-left: auto; white-space: nowrap; }
.scorecard__dim-score-denom { font-weight: 600; font-size: .85em; }
.scorecard__dim-na { font-weight: 600; color: var(--muted); }
.scorecard__dim-meter { width: 100%; height: .4rem; margin: .4rem 0 0;
                        border: 1px solid var(--border); border-radius: .3rem;
                        background: #eef1f4; overflow: hidden; }
.scorecard__dim-meter-fill { display: block; height: 100%; background: var(--accent); }
.scorecard__dim-label { margin: .35rem 0 0; font-weight: 600; }
.scorecard__dim-evidence { margin: .25rem 0 0; }

/* Full-degrade note when neither scorecard nor verdict was produced. */
.scorecard__unavailable { margin: 1.25rem 0 0; }

/* --- #162: KI-Sichtprüfung (visual-judge) — result block + per-job toggle.
   ZERO new colour tokens — reuses --pass/--warn/--muted/--border (all AA-documented in :root).
   Verdict state is conveyed by left-border SHAPE + badge icon + German word, never colour
   alone (WCAG 1.4.1). The badge itself (.badge--pass/--warn/--neutral) is set in the template;
   here we shape the surrounding section so the block reads as a distinct, on-brand panel.
   Responsive: no fixed widths; the section flexes to the result-panel container. --- */

/* Result-side panel. Left-border colour echoes the verdict; the icon + word in the badge
   carry the meaning without relying on the border colour. Same border-radius / spacing
   convention as .scorecard__verdict. */
.visual-judge { border: 1px solid var(--border); border-left-width: 4px;
                border-radius: .5rem; padding: 1rem 1.25rem; margin: 1.25rem 0 0; }
.visual-judge .result__subheading { margin-top: 0; }
/* ok → green (--pass), findings → warn (--warn), not_checked → neutral grey (--muted). */
.visual-judge--ok          { border-left-color: var(--pass-fg); background: var(--pass-bg); }
.visual-judge--findings    { border-left-color: var(--warn-fg); background: var(--warn-bg); }
.visual-judge--not_checked { border-left-color: var(--muted);   background: #eef1f4; }
/* The badge sits inside the panel; let it breathe without the global 1rem bottom margin. */
.visual-judge__badge { margin: 0 0 .5rem; }
/* Missing-element list — same reset/border-top rhythm as .rules / .scorecard__dims. */
.visual-judge__missing { list-style: none; padding: 0; margin: 0 0 .5rem; }
.visual-judge__missing-item { border-top: 1px solid var(--border); padding: .5rem 0;
                              font-weight: 600; }
.visual-judge__missing-item:first-child { border-top: 0; }
.visual-judge__confidence { margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.visual-judge__reason { margin: 0 0 .5rem; }
.visual-judge__note { margin: 0; }

/* Per-job toggle (dashboard.html / batch.html) — same tappable-row look as .task-option.
   Checkbox kept large; whole row stays comfortably above the 48px target. */
.visual-judge-option { display: flex; align-items: flex-start; gap: .6rem;
                       border: 1px solid var(--border); border-radius: .5rem;
                       padding: .75rem; margin: 1.25rem 0 0; background: #fff; }
.visual-judge-option input[type="checkbox"] { width: 1.3rem; height: 1.3rem; margin: .1rem 0 0;
                                              flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.visual-judge-option label { display: block; margin: 0; font-weight: 600;
                             min-height: 1.5rem; cursor: pointer; }
.visual-judge-option__desc { display: block; font-weight: 400; margin-top: .15rem; }
/* Checked state: border + background (colour-not-alone — the native check carries the state). */
.visual-judge-option:has(input[type="checkbox"]:checked) { border-color: var(--accent); background: #eef4fb; }
.visual-judge-option:has(input[type="checkbox"]:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Reduced motion: kill all animation/transition; spinner becomes a static ring. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .spinner { border-top-color: var(--border); }
}

/* --- Batch / multi-file (#XX) — reuses existing colour tokens; ZERO new tokens. --- */

/* Multi-file dropzone shares .dropzone; widen the dashed area slightly for folder drop. */
.dropzone--multi { padding: 1.25rem; }

/* Status counts row — icon + German text per status (never colour-only, WCAG 1.4.1). */
.batch__counts { list-style: none; padding: 0; margin: 0 0 .75rem;
                 display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.batch__count { display: inline-flex; align-items: center; gap: .35rem;
                font-variant-numeric: tabular-nums; }
.batch__count-icon { font-size: 1.1em; }

.batch__throughput { margin: 0 0 .75rem; font-variant-numeric: tabular-nums; }

/* Bulk-download block. */
.batch__bulk { margin: 0 0 1.25rem; }
.batch__bulk .muted { margin: .4rem 0 0; }

/* Per-document list. */
.batch__list { list-style: none; padding: 0; margin: 0; }
.batch__item { border: 1px solid var(--border); border-radius: .5rem;
               padding: 1rem; margin: 0 0 .75rem; }
/* Non-colour status cue: error items carry a thicker accent-coloured left border in
   ADDITION to the ✕ icon + "Fehlgeschlagen" text + role="alert". */
.batch__item--error { border-left-width: 4px; border-left-color: var(--fail-fg); }
.batch__item--done.batch__item--done { border-left-width: 4px; }
.batch__filename { margin: 0 0 .5rem; word-break: break-word; }
.batch__rate { margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.batch__item .badge { margin: 0 0 .5rem; }

/* Per-doc download row. */
.batch__downloads { display: flex; flex-wrap: wrap; align-items: center;
                    gap: .5rem 1rem; margin: .5rem 0 0; }

/* Compact download button — MUST keep the 48×48 minimum target (WCAG 2.5.8). */
.btn-download--sm { padding: .5rem .9rem; font-size: .95rem;
                    min-height: 48px; min-width: 48px; }

/* Disabled bulk-download: rendered as a non-interactive <span>. Non-colour cue —
   cursor:not-allowed + pointer-events:none + reduced opacity (aria-disabled on the
   element + an honest "available once a doc finishes" hint carry the real signal). */
.btn-download.is-disabled { background: var(--border); color: var(--muted);
                            cursor: not-allowed; pointer-events: none; opacity: .85; }

/* --- #149: "Vorlesen wie ein Screenreader" page — reuses existing tokens; ZERO new tokens.
   The UI of an a11y tool must itself be exemplary WCAG-2.1-AA: status by icon + text + shape,
   ≥48px targets, visible focus, reduced-motion safe (covered by the global kill above). --- */

/* Reading-order divergence warning reuses .cost-note shape (icon + bordered panel). The ⚠ icon +
   the word "Warnung" carry the signal; the left border reinforces it (never colour-only). */
.spoken-view__order-warning { align-items: flex-start; }
.spoken-view__order-warning-title { margin: 0 0 .35rem; }
.spoken-view__order-ok { margin: 0 0 1.25rem; }

/* Audio / copy controls row — buttons keep the 48×48 minimum target (WCAG 2.5.8). */
.spoken-view__audio-controls { display: flex; flex-wrap: wrap; gap: .75rem; margin: .75rem 0; }
.spoken-view__play-btn, .spoken-view__copy-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; min-width: 48px; padding: .6rem 1.2rem;
  border: 0; border-radius: .4rem; background: var(--accent); color: var(--accent-fg);
  font-size: 1rem; font-weight: 700; cursor: pointer;
}
.spoken-view__play-btn:hover, .spoken-view__copy-btn:hover { background: #094e91; }
/* Busy state during synth: native aria-busy cue + a non-colour "…" affordance via opacity. */
.spoken-view__play-btn[aria-busy="true"] { opacity: .8; cursor: progress; }
/* Visible twin of the assertive AT status region (#audio-status): a sighted operator must SEE
   idle → loading → playing → error, otherwise a slow server-side synth looks like a dead button.
   Empty until app.js writes a state; collapses when empty. Meaning is in the TEXT, not colour. */
.spoken-view__audio-status { margin: .5rem 0 0; font-weight: 600; }
.spoken-view__audio-status:empty { display: none; }
.spoken-view__play-icon, .spoken-view__copy-icon { font-size: 1.1em; }
/* Native audio element — full-width, native controls are the accessible core. */
.spoken-view__audio-el { display: block; width: 100%; margin: .5rem 0 0; }

/* Transcript list — the ORDER is meaningful, so it's an <ol>; rows have generous spacing. */
.spoken-view__list { list-style: none; padding: 0; margin: .5rem 0 0; counter-reset: seg; }
.spoken-view__segment { border-top: 1px solid var(--border); padding: .85rem 0; }
.spoken-view__segment:first-child { border-top: 0; }
/* Per-row meta: role badge + page + lang, wrapping on narrow viewports. */
.spoken-view__meta { display: flex; flex-wrap: wrap; align-items: center;
                     gap: .4rem .8rem; margin: 0 0 .35rem; }
.spoken-view__role { margin: 0; }
.spoken-view__role-word { font-weight: 700; }
.spoken-view__page, .spoken-view__lang { font-variant-numeric: tabular-nums; }
/* The spoken text — the row's primary content, full-contrast (--fg), comfortable measure. */
.spoken-view__text { margin: 0; }
/* Audio block wrapper + the visible button-text spans (icons are aria-hidden siblings). */
.spoken-view__audio { margin: .5rem 0 0; }
.spoken-view__play-text, .spoken-view__copy-text { font-weight: 700; }

/* ===========================================================================
   P0-4 — completion pass: styles for template classes that previously had NO rule
   (verdict/report/checkpoint/condition/human-condition/review surfaces).
   ZERO new colour tokens — reuses --pass-bg/fg, --fail-bg/fg, --warn-bg/fg, --neutral
   (#eef1f4), --border, --muted, --accent. WCAG 2.1 AA: status by icon + German word +
   SHAPE (left-border / pill), never colour alone (1.4.1); ≥48px targets on controls;
   visible focus inherited from the global :focus-visible ring; tables scroll on mobile.
   =========================================================================== */

/* --- Result heading / subheading / misc result-level blocks --- */
.result__heading { font-size: 1.2rem; margin: 0 0 .75rem; }
.result__subheading { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.result__note { margin: .75rem 0; }
.result__download { margin: 1rem 0 0; }
.result__review-link { margin: 1rem 0 .5rem; }
.result--error { border-left: 4px solid var(--fail-fg); }
.result--queued { border-left: 4px solid var(--accent); }

/* --- AAVS three-state verdict (P0-1/P0-3) — the headline answer, most prominent panel.
   Left-border SHAPE + the badge icon + German word distinguish the three states without
   relying on colour (WCAG 1.4.1). --- */
.scorecard__aavs { border: 1px solid var(--border); border-left-width: 6px;
                   border-radius: .6rem; padding: 1.25rem 1.5rem; margin: 0 0 1.25rem; }
.scorecard__aavs-heading { margin: 0 0 .6rem; font-size: 1.05rem;
                           text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.scorecard__aavs--pass    { border-left-color: var(--pass-fg); background: var(--pass-bg); }
.scorecard__aavs--fail    { border-left-color: var(--fail-fg); background: var(--fail-bg); }
.scorecard__aavs--neutral { border-left-color: var(--muted);   background: #eef1f4; }
/* The verdict badge itself is the loud signal — sized up, no bottom margin gap. */
.scorecard__aavs-badge { font-size: 1.3rem; padding: .45rem 1rem; margin: 0 0 .75rem; }
.scorecard__aavs-metrics { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem;
                           margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.scorecard__aavs-metric { white-space: nowrap; }
/* #501: caption relating the two 0-100 diagnostic scores (quality vs. BITV impact). */
.scorecard__score-note { margin: .1rem 0 .85rem; line-height: 1.45; }
/* "Nicht barrierefrei, weil:" plain-language reasons (P1-1). */
.scorecard__aavs-reasons { margin: .5rem 0 0; }
.scorecard__aavs-reasons-label { margin: 0 0 .25rem; font-weight: 700; }
.scorecard__aavs-reasons-list { margin: 0; padding-left: 1.25rem; }
.scorecard__aavs-reasons-list li { margin: .15rem 0; }
/* Honest abstention note — framed as intentional, on a calm panel (not an error). */
.scorecard__aavs-abstention { margin: .5rem 0 0; padding: .75rem 1rem;
                              background: #fff; border: 1px solid var(--border);
                              border-radius: .4rem; }

/* --- 3-Stufen-Verdikt (#183) — staged claim ladder block. Same left-border convention
   as the dual-gate verdict; each stage shapes its own border accent. Heading margin-top is
   owned by `.scorecard__stage-heading` above (the h4 sub-line heading has no
   `.result__subheading` class — see `.scorecard__stage--sub`). --- */
.scorecard__stage { border: 1px solid var(--border); border-left-width: 4px;
                    border-radius: .5rem; padding: 1rem 1.25rem; margin: 1.25rem 0 0; }
.scorecard__stage--certified   { border-left-color: var(--pass-fg); background: var(--pass-bg); }
.scorecard__stage--at-verified { border-left-color: var(--pass-fg); background: var(--pass-bg); }
.scorecard__stage--machine     { border-left-color: var(--warn-fg); background: var(--warn-bg); }
.scorecard__stage--non-conform { border-left-color: var(--fail-fg); background: var(--fail-bg); }
.scorecard__stage-badge { font-size: 1.05rem; margin: 0 0 .5rem; }
.scorecard__stage-missing-label { margin: 0 0 .25rem; }
.scorecard__stage-missing { margin: 0 0 .5rem; padding-left: 1.25rem; }
.scorecard__stage-missing li { margin: .15rem 0; }

/* --- Treue-Block (#137) — content-fidelity, equally-prominent to the verdict. --- */
.scorecard__fidelity { border: 1px solid var(--border); border-left-width: 4px;
                       border-radius: .5rem; padding: 1rem 1.25rem; margin: 1.25rem 0 0; }
.scorecard__fidelity .result__subheading { margin-top: 0; }
.scorecard__fidelity--pass    { border-left-color: var(--pass-fg); background: var(--pass-bg); }
.scorecard__fidelity--loss    { border-left-color: var(--fail-fg); background: var(--fail-bg); }
.scorecard__fidelity--neutral { border-left-color: var(--muted);   background: #eef1f4; }
.scorecard__fidelity-badge { margin: 0 0 .5rem; }
.scorecard__fidelity-score { margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.scorecard__fidelity-score-label { font-weight: 600; color: var(--muted); }
.scorecard__fidelity-score-num { font-size: 1.4rem; font-weight: 800; }
.scorecard__fidelity-score-denom { font-size: .95rem; }
.scorecard__fidelity-reasons { margin: 0 0 .5rem; padding-left: 1.25rem; }
.scorecard__fidelity-reason { margin: .15rem 0; }
.scorecard__fidelity-note { margin: 0; }

/* --- #501: progressive disclosure for the "other judgments" (AAVS quality-judgment, Treue,
   Barrierefreiheits-Score) — native <details>/<summary> (keyboard-operable, announced by
   screen readers without extra ARIA), closed by default. Mirrors the existing
   `.human-conditions__details` / `-summary` convention (see _human_checklist.html) so the
   two disclosure patterns on this page look and behave identically. --- */
.scorecard__details { margin: 1.25rem 0 0; }
.scorecard__details-summary { cursor: pointer; font-weight: 600; color: var(--accent);
                              padding: .5rem 0; }
.scorecard__details-summary:focus-visible { outline: 3px solid var(--accent);
                                            outline-offset: 2px; }
/* The wrapped section already carries its own top margin (1.25rem/0); zero it inside the
   details so opening it doesn't double that gap under the summary. */
.scorecard__details > .scorecard__aavs,
.scorecard__details > .scorecard__fidelity,
.scorecard__details > .scorecard { margin-top: 0; }

/* --- Before/after: missing column + count modifiers (P0-5 adds --warn). --- */
.ba__col--before { background: #fff; }
.ba__col--after.ba__col--fail { border: 2px solid var(--fail-fg); background: var(--fail-bg); }
/* P0-5: PDF/UA-konform-but-WCAG-fails state — warn shape, never green. */
.ba__col--after.ba__col--warn { border: 2px solid var(--warn-fg); background: var(--warn-bg); }
.ba__counts { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .35rem 0;
              list-style: none; padding: 0; font-variant-numeric: tabular-nums; }
.ba__count { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; }
.ba__count--pass { color: var(--pass-fg); }
.ba__count--fail { color: var(--fail-fg); }
.ba__rule-summary { margin: .35rem 0 .15rem; font-weight: 600; }
.ba__rule-note { margin: 0; }

/* --- Before/after stratified sample preview (Epic #289) — sighted spot-check, NOT a full audit.
   One <figure> per sampled page; each figure stacks a before→after PAIR + one caption. The badge
   ("N von Y Seiten geprüft") and the method line carry the honest scope in TEXT (#293), and the
   before/after distinction is text-borne (the "Original"/"Ergebnis" tags + alt-texts), never colour
   or position alone (WCAG 1.3.3 / 1.4.1). --- */
.ba-samples { margin: 0 0 1rem; }
.ba-samples__heading { font-size: .95rem; margin: 0 0 .35rem; }
.ba-samples__badge { display: flex; align-items: center; gap: .4rem; margin: 0 0 .15rem;
                     font-weight: 600; color: var(--fg); }       /* --fg: ~16:1 on white */
.ba-samples__badge-icon { color: var(--accent); }                 /* decorative; meaning is in text */
.ba-samples__method { margin: 0 0 1rem; }                         /* --muted: 7:1 on white */
.ba-sample { margin: 0 0 1.25rem; }
.ba-sample:last-child { margin-bottom: 0; }
.ba-sample__pair { display: grid; grid-template-columns: 1fr; gap: .75rem; align-items: start; }
.ba-sample__side { display: flex; flex-direction: column; gap: .35rem; }
.ba-sample__tag { font-weight: 600; font-size: .85rem; }          /* text-borne before/after label */
.ba-sample__img { display: block; width: 100%; max-width: 240px; height: auto;
                  border: 1px solid var(--border); border-radius: .4rem; background: #fff; }
.ba-sample__arrow { display: none; text-align: center; font-size: 1.4rem; color: var(--muted); }
.ba-sample__cap { margin: .5rem 0 0; font-size: .85rem; }
@media (min-width: 32rem) {
  .ba-sample__pair { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .ba-sample__arrow { display: block; }
}

/* --- Reflow / route-honesty note (#237): preserved = calm green, reflow = neutral warn. --- */
.reflow-note { margin: 1rem 0; }
.reflow-note--preserved { border-left-color: var(--pass-fg); background: var(--pass-bg); }

/* --- veraPDF/Matterhorn report + WCAG quality report (shared .report/.checkpoint shell). --- */
.report { border: 1px solid var(--border); border-radius: .6rem;
          padding: 1.25rem; margin: 1.25rem 0 0; }
.report .result__subheading { margin-top: 0; }
.report__intro { margin: 0 0 1rem; }
.quality-report { /* same shell as .report; modifier hook for future divergence */ }
.quality-report__all-clear { margin: 0 0 1rem; }

.checkpoint { border-top: 1px solid var(--border); padding: 1rem 0 .25rem; margin: 0; }
.checkpoint:first-of-type { border-top: 0; }
.checkpoint__heading { display: flex; flex-wrap: wrap; align-items: baseline;
                       gap: .3rem .6rem; font-size: .95rem; margin: 0 0 .5rem; }
.checkpoint__icon { color: var(--fail-fg); }
.checkpoint__num { font-weight: 700; }
.checkpoint__label { flex: 1 1 12rem; }
.checkpoint__count { font-weight: 400; }
.checkpoint__rules { list-style: none; padding: 0; margin: 0; }

/* WCAG quality group/finding extras (mirrors .rule rhythm). */
.quality-group { /* shares .checkpoint shell */ }
.quality-group__severity { padding: .15rem .5rem; margin: 0; font-size: .85rem; }
.quality-group__severity-word { font-weight: 700; }
.quality-finding { /* shares .rule shell */ }
.finding__severity { margin-right: .15rem; }
.finding__severity-word { font-weight: 700; }
.finding__autofix-badge { font-size: .8rem; padding: .1rem .5rem; margin: 0 0 0 .4rem;
                          vertical-align: middle; }
/* P1-1: plain-language fix hint line under a finding. */
.finding__fix-hint { margin: .25rem 0 0; }
.finding__fix-hint-label { font-weight: 700; }

/* --- Matterhorn condition-index report (#166). --- */
.conditions { border: 1px solid var(--border); border-radius: .6rem;
              padding: 1.25rem; margin: 1.25rem 0 0; }
.conditions .result__subheading { margin-top: 0; }
.conditions__intro { margin: 0 0 1rem; }
.conditions__subheading { font-size: .95rem; margin: 1rem 0 .5rem; }
.conditions__list { list-style: none; padding: 0; margin: 0 0 1rem; }
.condition { border-top: 1px solid var(--border); padding: .65rem 0; }
.condition:first-child { border-top: 0; }
.condition--violated { border-left: 4px solid var(--fail-fg); padding-left: .75rem; }
.condition__head { display: flex; flex-wrap: wrap; align-items: baseline;
                   gap: .3rem .6rem; margin: 0 0 .25rem; }
.condition__icon { color: var(--fail-fg); }
.condition__index { font-weight: 700; font-variant-numeric: tabular-nums; }
.condition__count { font-weight: 400; }
.condition__text { margin: 0 0 .25rem; }
.condition__pages { margin: 0; }
/* Passive-status summary (machine / human / no-method) — definition list. */
.conditions__summary { display: grid; grid-template-columns: 1fr; gap: .5rem;
                       margin: 1rem 0 0; }
.conditions__summary-row { display: flex; flex-wrap: wrap; align-items: baseline;
                           gap: .35rem .75rem; }
.conditions__summary-row dt { margin: 0; }
.conditions__summary-row dd { margin: 0; }
.conditions__footnote { margin: 1rem 0 0; font-size: .8rem; }

/* --- Human-condition checklist (#167) — summary dl + scrollable table. --- */
.human-conditions { border: 1px solid var(--border); border-radius: .6rem;
                    padding: 1.25rem; margin: 1.25rem 0 0; }
.human-conditions .result__subheading { margin-top: 0; }
.human-conditions__intro { margin: 0 0 1rem; }
.human-conditions__summary { display: grid; grid-template-columns: 1fr; gap: .5rem;
                             margin: 0 0 1rem; }
.human-conditions__summary-row { display: flex; flex-wrap: wrap; align-items: baseline;
                                 gap: .35rem .75rem; }
.human-conditions__summary-row dt { margin: 0; }
.human-conditions__summary-row dd { margin: 0; }
/* Table scrolls horizontally on narrow viewports — no overflow clipping (P1-4). */
.human-conditions__table { width: 100%; border-collapse: collapse; display: block;
                           overflow-x: auto; font-size: .9rem; }
.human-conditions__caption { text-align: left; font-weight: 600; margin: 0 0 .5rem;
                             caption-side: top; }
.human-conditions__table th, .human-conditions__table td {
  border: 1px solid var(--border); padding: .5rem .6rem; text-align: left;
  vertical-align: top; }
.human-conditions__table thead th { background: #f2f2f2; font-weight: 700; white-space: nowrap; }
.human-condition { /* <tr> hook — cell styling comes from the shared th/td rules above */ }
.human-condition__index { font-variant-numeric: tabular-nums; white-space: nowrap; }
.human-condition__checkpoint { min-width: 9rem; }
.human-condition__class { white-space: nowrap; }
.human-condition__mechanism { word-break: break-word; min-width: 12rem; }
.human-condition__status { white-space: nowrap; }
.human-condition__icon { margin-right: .15rem; }
.human-condition__note { display: block; margin-top: .25rem; }
/* Row status accents — left-border SHAPE on the first cell complements the badge word. */
.human-condition--human_released .human-condition__index { border-left: 4px solid var(--pass-fg); }
.human-condition--na_verified .human-condition__index    { border-left: 4px solid var(--pass-fg); }
.human-condition--open .human-condition__index           { border-left: 4px solid var(--muted); }
.human-condition--no_method .human-condition__index      { border-left: 4px solid var(--muted); }
/* #497 — engine-addressed-but-unsigned: accent (info) border, distinct from amber "offen". */
.human-condition--addressed .human-condition__index      { border-left: 4px solid var(--accent); }
/* #500 — inline one-click HITL sign-off (addressed-open rows only). Buttons reuse the shared
   .btn/.btn--approve/.btn--override (≥48px touch target, WCAG 2.5.8) defined below. */
.human-condition__signoff { margin: .5rem 0 0; }
.human-condition__signoff-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* #497 — honest-framing headline + collapsed auditor table (leads with what the engine delivers). */
.human-conditions__headline { margin: .25rem 0 1rem; line-height: 1.5; }
.human-conditions__details { margin-top: .5rem; }
.human-conditions__details-summary { cursor: pointer; font-weight: 600; color: var(--accent);
  padding: .5rem 0; }
.human-conditions__details-summary:focus-visible { outline: 3px solid var(--accent);
  outline-offset: 2px; }
.human-conditions__details[open] .human-conditions__details-summary { margin-bottom: .5rem; }

/* --- Extra badge variants (condition / human-condition / review states).
   Reuse the existing pass/warn/neutral token families; the German WORD inside each badge
   carries the meaning, so colour is never the sole signal (WCAG 1.4.1). --- */
.badge--violated  { background: var(--fail-bg); color: var(--fail-fg); }
.badge--machine   { background: var(--pass-bg); color: var(--pass-fg); }
.badge--human     { background: var(--warn-bg); color: var(--warn-fg); }
.badge--open      { background: var(--warn-bg); color: var(--warn-fg); }
.badge--no-method { background: #eef1f4; color: var(--muted); border: 1px solid var(--border); }
/* #519 — NOT_COVERED_BY_PROFILE: machine-checkable condition, but no veraPDF rule in the pinned
   profile can ever fire it (e.g. 10-001 character→Unicode mapping). Distinct grey from
   .badge--no-method (dashed vs solid border) so "ungeprüft wegen Profil-Lücke" never visually
   collapses into "keine Prüfmethode definiert" — the German label carries the distinction too. */
.badge--not-covered { background: #eef1f4; color: var(--muted); border: 1px dashed var(--border); }
.badge--released  { background: var(--pass-bg); color: var(--pass-fg); }
.badge--na        { background: var(--pass-bg); color: var(--pass-fg); }
.badge--addressed { background: #eaf1fb; color: var(--accent); border: 1px solid #a9c8ec; }
/* #499 AAVS confidence-gated auto-release ("maschinell adressiert, hohe Konfidenz"). Distinct
   indigo — set apart from the green verified/released badges and the blue addressed badge; status
   is carried by the icon + label text too, never colour alone (WCAG 1.4.1). #3f2f8a on #ece9fb
   ≈ 9:1 contrast, well over the 4.5:1 AA floor. .badge--machine reuses the green pass tokens. */
.badge--aavs      { background: #ece9fb; color: #3f2f8a; border: 1px solid #b7afe6; }

/* --- HITL review queue page (#92) + derived certified verdict (P1-8). --- */
.review-queue-page { /* shares .card .result shell */ }
.review-queue-page__intro { margin: 0 0 1rem; }
.review-queue-page__back { margin: 1.25rem 0 0; }
/* Certified-verdict banner — three states by left-border + badge icon + German word. */
.review-certified { border: 1px solid var(--border); border-left-width: 4px;
                    border-radius: .5rem; padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
.review-certified .result__subheading { margin-top: 0; }
.review-certified--pass    { border-left-color: var(--pass-fg); background: var(--pass-bg); }
.review-certified--warn    { border-left-color: var(--warn-fg); background: var(--warn-bg); }
.review-certified--neutral { border-left-color: var(--muted);   background: #eef1f4; }
.review-certified__badge { margin: 0 0 .5rem; }
.review-certified__reason { margin: 0; font-weight: 600; }
.review-queue { list-style: none; padding: 0; margin: 0; }
.review-queue__empty { display: flex; align-items: center; gap: .4rem;
                       border: 1px solid var(--pass-fg); border-left-width: 4px;
                       border-radius: .4rem; padding: .75rem 1rem; background: var(--pass-bg);
                       color: var(--pass-fg); font-weight: 600; }
.review-item { border: 1px solid var(--border); border-radius: .5rem;
               padding: 1rem; margin: 0 0 .75rem; }
.review-item--pending    { border-left: 4px solid var(--warn-fg); }
.review-item--approved   { border-left: 4px solid var(--pass-fg); }
.review-item--overridden { border-left: 4px solid var(--warn-fg); }
.review-item__header { display: flex; flex-wrap: wrap; align-items: center;
                       gap: .4rem .75rem; margin: 0 0 .5rem; }
.review-item__kind { margin: 0; }
.review-item__page { font-variant-numeric: tabular-nums; }
.review-item__status { margin: 0; }
.review-item__confidence { font-variant-numeric: tabular-nums; }
.review-item__value { margin: 0 0 .75rem; }
.review-item__value-label { margin: 0 0 .25rem; font-weight: 600; }
.review-item__value-text { margin: 0; padding: .6rem .9rem; border-left: 3px solid var(--border);
                           background: #f7f7f7; border-radius: 0 .3rem .3rem 0; }
.review-item__form { margin: 0; }
.review-item__note-label { display: block; margin: 0 0 .25rem; font-weight: 600; }
.review-item__note-input { display: block; width: 100%; min-height: 3rem; padding: .6rem;
                           border: 1px solid var(--border); border-radius: .4rem;
                           font: inherit; }
.review-item__note-hint { margin: .25rem 0 .5rem; }
.review-item__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: .5rem 0 0; }
.review-item__decided { margin: .5rem 0 0; }
.review-item__decided-status { margin: 0 0 .35rem; }
.review-item__decided-note { margin: 0; }
/* Review action buttons — real submit buttons, ≥48px target (WCAG 2.5.8). */
.btn { display: inline-flex; align-items: center; gap: .4rem;
       min-height: 48px; min-width: 48px; padding: .6rem 1.2rem;
       border: 0; border-radius: .4rem; font-size: 1rem; font-weight: 700; cursor: pointer; }
.btn--approve  { background: var(--pass-fg); color: var(--accent-fg); }
.btn--approve:hover  { background: #084e16; }
.btn--override { background: var(--warn-fg); color: var(--accent-fg); }
.btn--override:hover { background: #4f3a00; }
/* Review link in the result view — styled to match the navigation .link affordance. */
.review-link { display: inline-flex; align-items: center; gap: .4rem;
               min-height: 48px; padding: .5rem .9rem; color: var(--accent);
               font-weight: 600; text-decoration: underline; }
.review-link:hover { text-decoration: none; }

/* --- Batch root container + the pending member state. --- */
.batch { margin: 0; }
.batch__item--pending { border-left: 4px solid var(--warn-fg); }

/* Visible button-text spans inside the key show/hide toggle (icons are aria-hidden). */
.key-toggle__icon { font-size: 1.1em; }
.key-toggle__text { font-weight: 600; }

/* --- #563 (B4): audit-remediation split labels ("Automatisch behebbar" / "Manuell zu
   prüfen") — a COUNTER LABEL, not a status badge. `_audit_result.html` used to reuse `.badge`
   (pill shape, coloured fill), which is verwechselbar mit echten Status-Badges UND mit
   `button` (same border-radius/font-weight) — but this block is never interactive (no click
   target, no state to convey). Plain heading-weight text instead: no colour fill, no pill
   shape, no icon, no cursor:pointer/hover. The German words alone distinguish auto vs. manual
   (WCAG 1.4.1 — meaning is not colour-borne here, so nothing to duplicate). --- */
.audit-remediation__label { margin: 0 0 .5rem; font-size: .95rem; font-weight: 700; color: var(--fg); }
.audit-remediation__count { font-weight: 400; color: var(--muted); }

/* ===========================================================================
   #569/#570/#571 — AAVS-first Result-Page IA + standalone Audit full-page.
   ZERO new colour tokens — reuses --fg/--muted/--border/--accent + the pass/fail/warn/neutral
   families already established in :root and used across this sheet (#eef1f4 neutral tint,
   #eef4fb accent tint). Status stays icon + German word + SHAPE (WCAG 1.4.1); navigation
   controls keep the ≥48px touch target (WCAG 2.5.8); every text/background pair holds ≥4.5:1
   (--fg ~16:1, --muted 7:1/6.8:1, --accent 5.3:1/~5:1 on the light tints). =========================== */

/* --- Leading AAVS verdict card (#569). It already carries `.scorecard__verdict--lead` + the
   `--pass/--fail/--neutral` state class, so it inherits the thick left border, padding and state
   background; `.aavs-card` only refines the container. --- */
.aavs-card { margin: 1.25rem 0 0; }
/* Verdict badge — the loud headline (icon + German word), sized up like the AAVS panel badge. */
.aavs-card__badge { font-size: 1.3rem; padding: .45rem 1rem; margin: 0 0 .75rem; }
/* Horizontal metric strip (Qualitäts-Score + Abdeckung) — wraps on narrow viewports; tabular
   figures keep the numbers aligned. Mirrors .scorecard__aavs-metrics. */
.aavs-card__metrics { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem;
                      margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.aavs-card__metric { white-space: nowrap; }
/* „Im Klartext" plain-language read — the most-read paragraph on the card; full-contrast --fg
   over the state tint, comfortable measure, no colour-borne meaning. */
.aavs-card__plain { margin: .5rem 0 0; line-height: 1.5; color: var(--fg); }

/* --- The SINGLE honesty block (#569) — a calm, clearly-bounded role="note" panel gathering the
   disclaimer + dual-gate definition + 3-Stufen legend in one place. Dezenter neutral frame + tint
   (never an error/warn colour — it is context, not a problem). --- */
.result__honesty { border: 1px solid var(--border); border-left-width: 4px;
                   border-left-color: var(--muted); border-radius: .5rem;
                   padding: 1rem 1.25rem; margin: 1.25rem 0 0; background: #eef1f4; }
.result__honesty .result__subheading { margin-top: 0; }
.result__honesty-dualgate, .result__honesty-legend { margin: .5rem 0 0; }
.result__honesty-ki { margin: .5rem 0 0; }

/* --- Navigation to the Audit full-page (#569/#570). A deutlicher block-level link — ≥48px touch
   target (WCAG 2.5.8), bordered + accent-tinted so it reads as a distinct „go deeper" affordance,
   not a muted inline note. --- */
.result__audit-link { margin: 1.25rem 0 0; }
.result__audit-link a { display: flex; align-items: center; min-height: 48px;
                        gap: .5rem; padding: .75rem 1rem; border: 1px solid var(--border);
                        border-left-width: 4px; border-left-color: var(--accent);
                        border-radius: .4rem; background: #eef4fb; color: var(--accent);
                        font-weight: 600; text-decoration: underline; }
.result__audit-link a:hover { text-decoration: none; }

/* --- Standalone Audit full-page (#570, audit.html) — section rhythm + page head. The seven
   auditor areas are separated by a top border + spacing so each reads as a distinct block; the
   `.audit__caveat` modifier shares this `.audit__section` shell. --- */
.audit__section { padding: 1.5rem 0 0; margin: 1.5rem 0 0; border-top: 1px solid var(--border); }
.audit__section:first-of-type { padding-top: 0; margin-top: 1rem; border-top: 0; }
.audit__lane-note { margin: .5rem 0 0; }
.audit__evidence-links { list-style: none; padding: 0; margin: .5rem 0 0; }
.audit__evidence-links li { padding: .35rem 0; }

/* --- Changelog page (/changelog) — dual-audience: Überblick + Technische Änderungen.
   Styled via this vendored sheet (no inline style) so it survives a CSP that drops
   style-src 'unsafe-inline' (the documented next-tightening candidate). --- */
.cl-buildinfo { margin: 0 0 1rem; }
.cl-release-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.cl-date { font-size: .9rem; font-weight: 400; }
.cl-summary { margin: .25rem 0 .75rem; }
.cl-highlights { margin: 0 0 1rem 1.1rem; padding: 0; }
.cl-highlights li { margin: .2rem 0; }
.changelog-release h3 { margin: 1.25rem 0 .5rem; }
.cl-group { border: 1px solid var(--border); border-radius: .5rem; padding: .5rem .75rem; margin: .5rem 0; }
.cl-group[open] { padding-bottom: .75rem; }
.cl-group__summary { font-weight: 600; cursor: pointer; padding: .25rem 0; }
.cl-group__summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cl-entries { list-style: none; padding: 0; margin: .5rem 0 0; }
.cl-entries li { padding: .35rem 0; border-top: 1px solid var(--border); line-height: 1.4; }
.cl-entries li:first-child { border-top: 0; }
.cl-scope { display: inline-block; font-size: .8rem; color: var(--muted);
  background: #eef1f4; border-radius: .25rem; padding: 0 .35rem; margin-left: .35rem; }
.cl-ref { font-size: .85rem; color: var(--muted); margin-left: .35rem; }
a.cl-ref { color: var(--accent); }
.cl-sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem;
  color: var(--muted); margin-left: .35rem; }
a.cl-sha { color: var(--accent); }
