/* Skill-Check
 *
 * Nach den Corporate Design Guidelines (Draft 2, Maerz 2026). Die drei
 * Regeln, die den Entwurf bestimmen:
 *
 * 1. Der Hintergrund ist IMMER weiss. Markenfarben erscheinen
 *    ausschliesslich als Akzente - schmale Balken, Rahmenkanten, Text,
 *    Icons. Keine grossen Farbflaechen, keine Farbverlaeufe.
 * 2. Blau #00539D ist die Ankerfarbe fuer Ueberschriften und
 *    Interaktion. Farbverhaeltnis etwa 70 Primaer / 20 Grau / 10 Akzent.
 * 3. Signalfarben (Rot, Orange, Gelb, Gruen) sind AUSSCHLIESSLICH fuer
 *    Status und Warnungen zugelassen, nie dekorativ. Hier fallen sie
 *    genau mit der Severity-Skala zusammen - vorgeschriebene
 *    Verwendung, nicht Geschmack.
 *
 * Schrift: Roboto, wie fuer Web/HTML vorgesehen. Die Richtlinie nennt
 * Google Fonts als Bezugsquelle; das waere hier ein Widerspruch zur
 * Zusage, dass nichts abfliesst. Roboto steht unter Apache 2.0 und
 * liegt deshalb lokal unter fonts/ - Lizenztext daneben.
 */

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- Primaerfarben (~70 %) --- */
  --blue: #00539d;
  --blue-deep: #002060; /* Hyperlinks laut Richtlinie */
  --black: #000000;
  --white: #ffffff;

  /* --- Funktionale Grautoene (~20 %) --- */
  --grey-dark: #424242; /* Kleintext, Bildunterschriften */
  --grey-mid: #888888;
  --grey-light: #8f8f8f; /* Fusszeile, Legal */
  --grey-pale: #bcbcbc;
  --surface: #f2f2f2; /* zugelassene Alternative zu Weiss */
  --hairline: #e2e2e2;

  /* --- Signalfarben (~10 %), nur Status und Warnung --- */
  --signal-red: #e0002b;
  --signal-orange: #ec7520;
  --signal-yellow: #fbbf09;
  --signal-green: #6caa25;
  --signal-lightblue: #00b1f2;

  --sans: 'Roboto', Arial, Helvetica, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'Roboto Mono', Menlo, monospace;

  --measure: 66ch;
  --shell: 820px;
  --radius: 6px;
  --radius-sm: 4px;
}

* { box-sizing: border-box; }

/* Muss vor allen display-Regeln stehen und !important tragen.
 * Das hidden-Attribut kommt aus dem Browser-Stylesheet und wird von
 * JEDER expliziten display-Angabe im Autoren-Stylesheet ueberschrieben.
 * Konkret: .outgoing-actions hat display:flex, und dadurch waren die
 * Knoepfe "Senden"/"Nicht senden" sichtbar, obwohl das Skript sie
 * korrekt auf hidden gesetzt hatte. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* Regel 1: der Hintergrund ist weiss. */
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Der Farbbalken aus dem Icon-Muster, als schmaler Akzentstreifen an
 * der Layoutkante. Das einzige Element, das alle fuenf Markenfarben
 * zeigt - und laut Richtlinie ausdruecklich zugelassen. */
.brandbar {
  display: flex;
  height: 4px;
}

.brandbar span { flex: 1; }
.brandbar span:nth-child(1) { background: var(--blue); }
.brandbar span:nth-child(2) { background: var(--signal-red); }
.brandbar span:nth-child(3) { background: var(--signal-orange); }
.brandbar span:nth-child(4) { background: var(--signal-yellow); }
.brandbar span:nth-child(5) { background: var(--signal-green); }

main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 32px 128px;
}

/* --- Kopf ------------------------------------------------------------ */

.masthead {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 28px 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

/* Platzhalter fuer das offizielle Logo. Wird nur angezeigt, wenn die
 * Datei tatsaechlich existiert - siehe onerror im HTML. Das Logo darf
 * laut Richtlinie nicht in einer anderen Schrift nachgebaut werden,
 * deshalb steht hier keine Nachbildung. */
.logo {
  height: 34px;
  width: auto;
  display: block;
}

.logo + .wordmark {
  padding-left: 16px;
  border-left: 1px solid var(--hairline);
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wordmark span {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--grey-light);
  letter-spacing: 0;
}

/* --- Aufnahme -------------------------------------------------------- */

h1 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  max-width: 24ch;
}

.lede {
  margin: 0 0 40px;
  max-width: 56ch;
  font-size: 1.09rem;
  font-weight: 300;
  color: var(--grey-dark);
}

/* Weisse Karte auf weissem Grund, abgesetzt durch eine Haarlinie und
 * einen 4px-Akzent an der Oberkante - genau die Kartenform, die die
 * Richtlinie beschreibt. */
.dropzone {
  position: relative;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 4px solid var(--blue);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 56px 32px 52px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dropzone:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  border-color: var(--grey-pale);
  border-top-color: var(--blue);
}

.dropzone:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.dropzone.is-armed {
  background: #f5f9fd;
  border-color: var(--blue);
  box-shadow: 0 6px 24px rgba(0, 83, 157, 0.14);
}

/* Icon-Stil laut Richtlinie: technisch, fein, 1-2px Kontur, nicht
 * gefuellt. */
.aperture {
  display: block;
  margin: 0 auto 22px;
  color: var(--blue);
}

.dropzone-primary {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.012em;
}

.dropzone-secondary {
  margin: 0;
  color: var(--grey-dark);
  font-size: 0.94rem;
}

/* Kleingedruckte Pfadhilfe unter dem Ablegen-Bereich. Die haeufigste
 * Rueckfrage ist nicht, wie das Werkzeug funktioniert, sondern wo die
 * eigenen Skills ueberhaupt liegen. */
.paths {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--grey-dark);
}

.paths > p {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--black);
}

.paths dl {
  margin: 0;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 10px 28px;
}

.paths dt { font-weight: 500; }

.paths dd { margin: 0; }

.paths dd span {
  display: block;
  margin-top: 3px;
  color: var(--grey-light);
}

.paths code {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.paths dd span code { background: none; padding: 0; }

.paths-hint {
  margin: 16px 0 0;
  padding: 10px 0 10px 16px;
  border-left: 4px solid var(--signal-yellow);
  max-width: var(--measure);
  /* Muss die Auszeichnung von ".paths > p" zuruecknehmen - die gilt
     der Ueberschrift, nicht diesem Absatz. */
  font-weight: 400;
  color: var(--grey-dark);
}

.paths-hint code { background: none; padding: 0; }

body.has-result .paths { display: none; }

.paste-area {
  margin-top: 24px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.paste-area > label {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 0.94rem;
}

textarea,
input[type='text'] {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--grey-pale);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input[type='text'] {
  font-family: var(--sans);
  font-size: 0.98rem;
}

textarea:focus,
input[type='text']:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 83, 157, 0.12);
}

.warn {
  margin: 18px 0;
  padding: 12px 0 12px 16px;
  border-left: 4px solid var(--signal-yellow);
  color: var(--grey-dark);
  font-size: 0.91rem;
  max-width: var(--measure);
}

/* --- Aufklappbares ---------------------------------------------------- */

summary {
  cursor: pointer;
  width: fit-content;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 11px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) translateY(-2px);
  transition: transform 160ms ease;
}

details[open] > summary::before {
  transform: rotate(45deg) translateY(-1px);
}

summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* --- Zusagen und Prueftiefe ------------------------------------------ */

.assurances,
.scope {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.assurances h2,
.scope h2 {
  margin: 0 0 26px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.014em;
}

.assurances dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  margin: 0;
}

.assurances dt {
  font-size: 0.99rem;
  font-weight: 700;
  margin-bottom: 5px;
}

/* Farbiger Punkt als Aufzaehlungszeichen - laut Richtlinie eine der
 * zugelassenen Akzentformen. Gruen, weil es eine erfuellte Zusage ist. */
.assurances dt::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 11px;
  vertical-align: 0.12em;
  background: var(--signal-green);
}

.assurances dd {
  margin: 0;
  font-size: 0.93rem;
  color: var(--grey-dark);
  max-width: 44ch;
}

.assurances-exception {
  margin: 32px 0 0;
  padding: 12px 0 12px 16px;
  border-left: 4px solid var(--signal-orange);
  font-size: 0.92rem;
  color: var(--grey-dark);
  max-width: var(--measure);
}

.scope ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.scope li {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 8px 32px;
  align-items: baseline;
}

.scope li:last-child { border-bottom: none; }
.scope li:first-child { padding-top: 0; }

.scope strong {
  font-size: 0.99rem;
  font-weight: 700;
}

.scope span {
  font-size: 0.93rem;
  color: var(--grey-dark);
}

.page-footer {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 28px 32px 80px;
  border-top: 1px solid var(--hairline);
}

.page-footer p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--grey-light);
  max-width: var(--measure);
}

/* --- Demo-Banner ----------------------------------------------------- */

/* Der Demo-Modus war einmal nur Kleintext unter dem Score. Das wurde
 * uebersehen, und dann sieht es aus, als bewerte das Werkzeug jeden
 * Skill mit 100 Punkten. Gelb ist die Signalfarbe fuer Vorsicht. */
.demo-banner {
  margin: 0;
  padding: 14px 32px;
  background: var(--signal-yellow);
  color: var(--black);
  font-size: 0.93rem;
  font-weight: 500;
  text-align: center;
}

/* --- Status ----------------------------------------------------------- */

.status {
  margin-top: 36px;
  padding: 18px 22px;
  background: var(--surface);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.97rem;
  color: var(--grey-dark);
}

.status.is-error {
  border-left-color: var(--signal-red);
  color: var(--black);
}

.status.is-busy { position: relative; overflow: hidden; }

/* Unbestimmter Fortschritt. Ein echter Scan laeuft mehrere Sekunden bis
 * eine Minute; ohne Rueckmeldung sieht das nach einem haengenden
 * Formular aus. */
.status.is-busy::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 30%;
  background: var(--blue);
  animation: sweep 1.5s ease-in-out infinite;
}

@keyframes sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}

/* --- Ergebnis -------------------------------------------------------- */

.result { margin-top: 56px; }

.verdict {
  display: flex;
  align-items: baseline;
  gap: 28px;
  flex-wrap: wrap;
}

.score {
  margin: 0;
  font-size: clamp(4rem, 15vw, 6rem);
  line-height: 0.8;
  font-weight: 300;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
}

.verdict-text {
  flex: 1 1 16ch;
  position: relative;
  top: -0.4rem;
}

.recommendation {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.scan-mode,
.artifact-kind {
  margin: 5px 0 0;
  font-size: 0.89rem;
  color: var(--grey-dark);
}

/* Die vier echten Score-Baender in den Signalfarben. Diese Zuordnung
 * ist keine Gestaltung, sondern die vorgeschriebene Verwendung:
 * Gruen ok, Gelb Vorsicht, Orange Warnung, Rot kritisch. */

.scale { margin-top: 38px; }

.scale-track {
  position: relative;
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: visible;
}

.band { display: block; height: 100%; }
.band:first-child { border-radius: 5px 0 0 5px; }
.band:last-child { border-radius: 0 5px 5px 0; }
.band-safe { background: var(--signal-green); }
.band-caution { background: var(--signal-yellow); }
.band-stop { background: var(--signal-orange); }
.band-critical { background: var(--signal-red); }

.scale-track .marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 3px;
  border-radius: 2px;
  background: var(--black);
  box-shadow: 0 0 0 2px var(--white);
  transform: translateX(-1.5px);
  transition: left 480ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.scale-labels {
  position: relative;
  height: 1.2em;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--grey-light);
  font-variant-numeric: tabular-nums;
}

.scale-labels span {
  position: absolute;
  transform: translateX(-50%);
}

.scale-labels span:first-child { transform: none; }
.scale-labels span:last-child { transform: translateX(-100%); }

.score-explainer { margin-top: 20px; }

.score-explainer > summary {
  font-size: 0.89rem;
  color: var(--grey-light);
}

.score-explainer p {
  margin: 14px 0 0 19px;
  font-size: 0.89rem;
  color: var(--grey-dark);
  max-width: var(--measure);
}

/* --- Flaechen -------------------------------------------------------- */

/* Weisse Karten mit Haarlinie. Farbe erscheint nur an der Kante. */
.panel,
.notice {
  margin-top: 36px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px 30px;
}

.panel > h2,
.notice > h2 {
  margin: 0 0 20px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.notice {
  border-left: 4px solid var(--signal-lightblue);
}

.notice p {
  margin: 0 0 14px;
  font-size: 0.93rem;
  color: var(--grey-dark);
  max-width: var(--measure);
}

.notice p:last-child { margin-bottom: 0; }

.files {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

.files td {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: baseline;
}

.files tr:last-child td { border-bottom: none; }

.files .path {
  font-family: var(--mono);
  font-size: 0.83rem;
  overflow-wrap: anywhere;
}

.files .meta {
  color: var(--grey-light);
  text-align: right;
  white-space: nowrap;
  padding-left: 16px;
}

.files .flag {
  color: var(--signal-orange);
  text-align: right;
  white-space: nowrap;
  padding-left: 16px;
  font-weight: 500;
}

/* --- Befunde --------------------------------------------------------- */

.findings {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 4px farbige linke Kante auf weisser Karte - die von der Richtlinie
 * beschriebene Kartenform, hier in der Signalfarbe der Einstufung. */
.finding {
  padding: 18px 0 18px 18px;
  border-left: 4px solid var(--grey-pale);
  border-bottom: 1px solid var(--hairline);
}

.findings li:last-child { border-bottom: none; padding-bottom: 0; }
.findings li:first-child { padding-top: 0; }

.finding[data-severity='CRITICAL'] { border-left-color: var(--signal-red); }
.finding[data-severity='HIGH'] { border-left-color: var(--signal-orange); }
.finding[data-severity='MEDIUM'] { border-left-color: var(--signal-yellow); }
.finding[data-severity='LOW'] { border-left-color: var(--signal-green); }

.finding-head {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}

.finding-title {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.008em;
}

.finding-rule {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--grey-dark);
  background: var(--surface);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.finding-where {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 0.79rem;
  color: var(--grey-light);
  overflow-wrap: anywhere;
}

.finding-snippet {
  margin: 12px 0 0;
  padding: 11px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.79rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}

.finding-why {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--grey-dark);
  max-width: var(--measure);
}

.empty {
  margin: 0;
  color: var(--grey-dark);
  font-size: 0.93rem;
  max-width: var(--measure);
}

.data-findings > summary {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--black);
}

.data-findings[open] > summary { margin-bottom: 18px; }

.data-lede {
  margin: 0 0 20px 19px;
  font-size: 0.9rem;
  color: var(--grey-dark);
  max-width: var(--measure);
}

/* --- Ausgehender Hinweis --------------------------------------------- */

/* Bewusst still. Nur die Kante in Blau markiert, dass hier etwas den
 * Rechner verlaesst - Blau ist laut Richtlinie die Signalfarbe fuer
 * informative Zustaende. */
.outgoing { border-left: 4px solid var(--blue); }

.outgoing-lede {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--grey-dark);
  max-width: var(--measure);
}

.payload {
  margin: 0;
  padding: 20px 22px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.81rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.outgoing-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.outgoing-state {
  margin: 18px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.anonymity-warning {
  margin: 18px 0 0;
  padding: 12px 0 12px 16px;
  border-left: 4px solid var(--signal-yellow);
  font-size: 0.89rem;
  color: var(--grey-dark);
  max-width: var(--measure);
}

.restart { margin-top: 40px; }

/* --- Bedienelemente -------------------------------------------------- */

.button {
  font: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--white);
  background: var(--blue);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 26px;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  background: var(--blue-deep);
  box-shadow: 0 3px 12px rgba(0, 83, 157, 0.24);
}

.button:active { transform: translateY(1px); }

.button:disabled {
  background: var(--grey-pale);
  cursor: default;
  box-shadow: none;
  transform: none;
}

.link-button {
  font: inherit;
  font-size: 0.96rem;
  color: var(--blue-deep);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(0, 32, 96, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 140ms ease;
}

.link-button:hover { text-decoration-color: currentColor; }

.button:focus-visible,
.link-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Meldeformular --------------------------------------------------- */

.sheet {
  width: min(600px, calc(100vw - 32px));
  border: none;
  border-top: 4px solid var(--blue);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 32px 34px;
  background: var(--white);
  color: var(--black);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.3);
}

.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }

.sheet h2 {
  margin: 0 0 12px;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.sheet-warning {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: var(--surface);
  border-left: 4px solid var(--signal-orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  max-width: var(--measure);
}

.sheet-lede {
  margin: 0 0 26px;
  font-size: 0.95rem;
  color: var(--grey-dark);
  max-width: var(--measure);
}

.sheet fieldset {
  border: none;
  border-top: 1px solid var(--hairline);
  padding: 20px 0 6px;
  margin: 0 0 20px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.sheet legend {
  font-size: 0.94rem;
  font-weight: 700;
  padding: 0;
}

.sheet fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  cursor: pointer;
}

input[type='radio'],
input[type='checkbox'] { accent-color: var(--blue); }

.field { display: block; margin-bottom: 20px; }

.field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.94rem;
  font-weight: 700;
}

.field small {
  display: block;
  margin-top: 7px;
  font-size: 0.85rem;
  color: var(--grey-light);
}

.attach {
  margin: 0 0 22px;
  padding: 18px 20px;
  background: var(--surface);
  border-left: 4px solid var(--signal-lightblue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.attach-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.attach-toggle input { margin-top: 0.3em; }
.attach-toggle strong { display: block; font-size: 0.96rem; font-weight: 700; }

.attach-toggle small {
  display: block;
  margin-top: 4px;
  font-size: 0.87rem;
  color: var(--grey-dark);
}

.attach-preview { margin-top: 16px; }

.attach-preview > summary {
  font-size: 0.88rem;
  color: var(--blue-deep);
}

.attach-preview .payload {
  margin-top: 14px;
  max-height: 260px;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--hairline);
  white-space: pre-wrap;
}

.sheet-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sheet-state {
  margin: 20px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.sheet-state .case-id {
  font-family: var(--mono);
  background: var(--surface);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
}

/* --- Nach einem Ergebnis --------------------------------------------- */

/* Der Aufnahmebereich schrumpft, sonst steht das Urteil unterhalb
 * eines vollen Bildschirms Hero. */
body.has-result .intake h1,
body.has-result .intake .lede,
body.has-result .assurances,
body.has-result .scope,
body.has-result .page-footer { display: none; }

body.has-result .dropzone {
  padding: 22px 26px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

body.has-result .aperture {
  margin: 0;
  width: 30px;
  height: 20px;
  flex: 0 0 auto;
}

body.has-result .dropzone-primary { margin: 0; font-size: 1.02rem; }
body.has-result .dropzone-secondary { margin-left: auto; }

/* --- Bewegung und enge Fenster --------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 620px) {
  .paths dl { grid-template-columns: minmax(0, 1fr); gap: 4px 0; }
  .paths dt { margin-top: 12px; }
  .assurances dl { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .scope li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 560px) {
  main { padding: 0 20px 88px; }
  .masthead { padding: 20px 20px 32px; }
  .brand { gap: 12px; }
  .logo { height: 28px; }
  .dropzone { padding: 42px 22px 38px; }
  .panel,
  .notice,
  /* Kleingedruckte Pfadhilfe unter dem Ablegen-Bereich. Die haeufigste
 * Rueckfrage ist nicht, wie das Werkzeug funktioniert, sondern wo die
 * eigenen Skills ueberhaupt liegen. */
.paths {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--grey-dark);
}

.paths > p {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--black);
}

.paths dl {
  margin: 0;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 10px 28px;
}

.paths dt { font-weight: 500; }

.paths dd { margin: 0; }

.paths dd span {
  display: block;
  margin-top: 3px;
  color: var(--grey-light);
}

.paths code {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.paths dd span code { background: none; padding: 0; }

.paths-hint {
  margin: 16px 0 0;
  padding: 10px 0 10px 16px;
  border-left: 4px solid var(--signal-yellow);
  max-width: var(--measure);
  /* Muss die Auszeichnung von ".paths > p" zuruecknehmen - die gilt
     der Ueberschrift, nicht diesem Absatz. */
  font-weight: 400;
  color: var(--grey-dark);
}

.paths-hint code { background: none; padding: 0; }

body.has-result .paths { display: none; }

.paste-area { padding: 22px 20px; }
  .page-footer { padding: 24px 20px 64px; }
  .verdict { gap: 18px; }
  .assurances,
  .scope { margin-top: 42px; }
}
