/*
 * Das Designsystem des Jobsuch-o-mat (ADR 0023).
 *
 * Aufbau nach Webflow.Jobs (ruhige Zeilen, eine Aktion), Look nach Wispr Flow
 * (Creme, Serif mit Kursiv, Tannengrün, zartes Lila). Kein Build-Schritt, kein
 * JavaScript: alles hier ist CSS, das ohne Vorverarbeitung im Browser läuft.
 *
 * Reihenfolge: Schriften, Farben, Grundlagen, Gerüst, Bausteine, Seiten, Druck.
 * Die Klassennamen folgen ADR 0001 — Fachbegriffe deutsch, kurz, ohne BEM.
 */

/* ------------------------------------------------------------------ Schriften */
/* EB Garamond und Figtree, SIL OFL 1.1 — Lizenzen neben den Dateien. */

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url("/statisch/schriften/eb-garamond-latin-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-display: swap;
  font-weight: 400 800;
  src: url("/statisch/schriften/eb-garamond-latin-wght-italic.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url("/statisch/schriften/eb-garamond-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-display: swap;
  font-weight: 400 800;
  src: url("/statisch/schriften/eb-garamond-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/statisch/schriften/figtree-latin-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Figtree;
  font-style: italic;
  font-display: swap;
  font-weight: 300 900;
  src: url("/statisch/schriften/figtree-latin-wght-italic.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/statisch/schriften/figtree-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Figtree;
  font-style: italic;
  font-display: swap;
  font-weight: 300 900;
  src: url("/statisch/schriften/figtree-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

/* -------------------------------------------------------------------- Farben */
/*
 * Kontraste nach WCAG 2.2 gerechnet (Text ≥ 4,5:1 auf --grund und --papier).
 * `--akzent-2` (Lila) ist nur Fläche — als Textfarbe auf Creme reicht es nicht.
 */

:root {
  color-scheme: light dark;
  --grund: #fbf7ef;
  --papier: #fffdf9;
  --flaeche: #f3eedf;
  --linie: #e4dfd0;
  --linie-stark: #cfc7b3;
  --schrift: #1a1a1a;
  --leise: #6b6358;
  --akzent: #1f4d3a;
  --akzent-hell: #dcebe2;
  --auf-akzent: #fffdf9;
  --akzent-2: #e9ddf7;
  --auf-akzent-2: #3d2a63;
  --gut: #2a6443;
  --gut-flaeche: #e1efe6;
  --warn: #85540e;
  --warn-flaeche: #f7ebd3;
  --schlecht: #9b3426;
  --schlecht-flaeche: #f6e1dc;
  --schatten: 0 1px 2px rgb(60 50 30 / 6%), 0 8px 24px -12px rgb(60 50 30 / 18%);

  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Figtree, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Fließende Schriftgrade (Utopia-Art): 360 px → 1240 px Breite. */
  --grad--1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --grad-0: clamp(1rem, 0.97rem + 0.14vw, 1.0625rem);
  --grad-1: clamp(1.125rem, 1.07rem + 0.25vw, 1.3125rem);
  --grad-2: clamp(1.375rem, 1.26rem + 0.5vw, 1.75rem);
  --grad-3: clamp(1.75rem, 1.5rem + 1.1vw, 2.5rem);
  --grad-4: clamp(2.25rem, 1.8rem + 2vw, 3.5rem);

  --rund-s: 10px;
  --rund: 16px;
  --rund-l: 24px;
  --breite: 1160px;
  --rand: clamp(16px, 4vw, 32px);
  --kopfhoehe: 64px;
  --tabhoehe: 0px;
}

/* Dunkel: warmes Gegenstück zum Cremeton, folgt dem Gerät (kein Schalter, Max 19.9.2026). */
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #1c1915;
    --papier: #24201b;
    --flaeche: #2c2721;
    --linie: #39332b;
    --linie-stark: #4d463c;
    --schrift: #ede6da;
    --leise: #a89f91;
    --akzent: #8fc7a8;
    --akzent-hell: #22352b;
    --auf-akzent: #13201a;
    --akzent-2: #3a3150;
    --auf-akzent-2: #e3d6f7;
    --gut: #86c9a0;
    --gut-flaeche: #1f3027;
    --warn: #e0b56a;
    --warn-flaeche: #352a18;
    --schlecht: #ec9a8a;
    --schlecht-flaeche: #3b231e;
    --schatten: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px -14px rgb(0 0 0 / 60%);
  }
}

/* ---------------------------------------------------------------- Grundlagen */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--kopfhoehe) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--grund);
  color: var(--schrift);
  font-family: var(--sans);
  font-size: var(--grad-0);
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tabhoehe);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: var(--grad-4);
}

h2 {
  font-size: var(--grad-3);
  margin: 56px 0 16px;
}

h3 {
  font-size: var(--grad-2);
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
  color: var(--akzent);
}

p {
  margin: 0 0 12px;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.875em;
}

code {
  background: var(--flaeche);
  border-radius: 6px;
  padding: 0.08em 0.36em;
}

pre {
  background: var(--flaeche);
  border-radius: var(--rund-s);
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

strong {
  font-weight: 650;
}

ul {
  padding-left: 1.2em;
}

:focus-visible {
  outline: 3px solid var(--akzent);
  outline-offset: 2px;
  border-radius: 6px;
}

.zahl,
time,
td {
  font-variant-numeric: tabular-nums;
}

.nur-leser {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.nur-druck {
  display: none;
}

/* ---------------------------------------------------------------------- Gerüst */

.sprung {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: var(--akzent);
  color: var(--auf-akzent);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.sprung:focus {
  top: 12px;
}

.huelle {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding-inline: var(--rand);
}

.kopf {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--grund) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--linie);
}

.kopf .huelle {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--kopfhoehe);
}

.wortmarke {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wortmarke em {
  color: var(--akzent);
}

.wortmarke svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.hauptnav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hauptnav > a,
.mehr > summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--leise);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.hauptnav > a:hover,
.mehr > summary:hover {
  color: var(--schrift);
  background: var(--flaeche);
}

.hauptnav > a[aria-current="page"],
.mehr[data-aktiv] > summary {
  color: var(--schrift);
  background: var(--papier);
  box-shadow: inset 0 0 0 1px var(--linie);
}

.mehr {
  position: relative;
}

.mehr > summary {
  list-style: none;
}

.mehr > summary::-webkit-details-marker {
  display: none;
}

.mehr > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.mehr[open] > summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.mehr > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  box-shadow: var(--schatten);
  padding: 8px;
  display: grid;
}

.mehr > div a {
  padding: 10px 12px;
  border-radius: var(--rund-s);
  text-decoration: none;
}

.mehr > div a:hover,
.mehr > div a[aria-current="page"] {
  background: var(--flaeche);
}

.mehr > div small {
  display: block;
  color: var(--leise);
  font-size: var(--grad--1);
}

main {
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: 48px;
}

.fuss {
  border-top: 1px solid var(--linie);
  color: var(--leise);
  font-size: var(--grad--1);
  padding-block: 24px 32px;
}

.fuss p {
  margin: 0;
}

/* Untere Tab-Leiste: nur am Handy, nur mit Navigation. */
.tableiste {
  display: none;
}

@media (max-width: 47.99rem) {
  :root {
    --kopfhoehe: 56px;
  }

  body:has(.tableiste) {
    --tabhoehe: calc(68px + env(safe-area-inset-bottom));
  }

  .hauptnav > a {
    display: none;
  }

  .wortmarke {
    font-size: 1.4rem;
  }

  .tableiste {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    background: color-mix(in srgb, var(--papier) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--linie);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }

  .tableiste a {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-height: 56px;
    padding-top: 6px;
    border-radius: 14px;
    color: var(--leise);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
  }

  .tableiste svg {
    width: 24px;
    height: 24px;
  }

  .tableiste a[aria-current="page"] {
    color: var(--akzent);
    background: var(--akzent-hell);
  }
}

/* ------------------------------------------------------------------ Bausteine */

/* Seitenkopf: Überschrift mit Kursivteil, Unterzeile, Aktionen. */
.seitenkopf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.seitenkopf .zurueck {
  flex-basis: 100%;
}

.seitenkopf > div:first-of-type {
  min-width: min(100%, 20rem);
  flex: 1 1 28rem;
}

.seitenkopf .dachzeile {
  color: var(--leise);
  font-size: var(--grad--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.seitenkopf .unterzeile {
  color: var(--leise);
  font-size: var(--grad-1);
  margin: 12px 0 0;
  max-width: 60ch;
}

.aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--leise);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.zurueck:hover {
  color: var(--schrift);
}

/* Karte: die Fläche für alles, was zusammengehört. */
.karte {
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--rund-l);
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 16px;
}

.karte > :last-child {
  margin-bottom: 0;
}

.karte h3 {
  margin-bottom: 6px;
}

.karte h3 a {
  text-decoration: none;
}

.karte.leise {
  background: var(--flaeche);
  border-color: transparent;
}

.abschnitt {
  margin-top: clamp(40px, 6vw, 64px);
}

.abschnitt > h2 {
  margin-top: 0;
}

.abschnitt-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.abschnitt-kopf h2 {
  margin: 0;
}

.abschnitt-kopf p {
  margin: 0;
  color: var(--leise);
}

/* Zeile: Metadaten nebeneinander, umbrechend. */
.zeile {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  color: var(--leise);
  font-size: 0.9375rem;
}

/*
 * Der Trennpunkt sitzt im Zwischenraum links vom Eintrag. Bricht die Zeile um,
 * liegt er vor dem Zeilenanfang und wird abgeschnitten — nie „· 1 km" am Rand.
 */
.zeile {
  overflow: clip;
  overflow-clip-margin: 4px;
}

.zeile > span:not(.marke) {
  position: relative;
}

.zeile > span:not(.marke) + span:not(.marke) {
  margin-left: 6px;
}

.zeile > span:not(.marke) + span:not(.marke)::before {
  content: "·";
  position: absolute;
  left: -11px;
  color: var(--leise);
}

/* Marke: Zustand, Gehalt, Hinweis — immer mit Text, nie nur Farbe (WCAG 1.4.1). */
.marke {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  background: var(--flaeche);
  color: var(--schrift);
  white-space: nowrap;
}

.marke.gut {
  background: var(--gut-flaeche);
  color: var(--gut);
}

.marke.warn {
  background: var(--warn-flaeche);
  color: var(--warn);
}

.marke.schlecht {
  background: var(--schlecht-flaeche);
  color: var(--schlecht);
}

.marke.lila {
  background: var(--akzent-2);
  color: var(--auf-akzent-2);
}

.marke.punkt::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Bewerbungsstand: je Zustand eine eigene Farbe, der Text trägt die Bedeutung. */
.marke.stand-neu {
  background: var(--akzent-2);
  color: var(--auf-akzent-2);
}

.marke.stand-vorgemerkt {
  background: var(--warn-flaeche);
  color: var(--warn);
}

.marke.stand-beworben {
  background: var(--akzent);
  color: var(--auf-akzent);
}

.marke.stand-abgesagt,
.marke.stand-verworfen {
  background: var(--schlecht-flaeche);
  color: var(--schlecht);
}

.marke.stand-erledigt {
  background: var(--gut-flaeche);
  color: var(--gut);
}

/* Knöpfe. Jeder <button> ist ohne Klasse der sekundäre Knopf. */
button,
.knopf {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--linie-stark);
  background: var(--papier);
  color: var(--schrift);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

button:hover,
.knopf:hover {
  border-color: var(--akzent);
  color: var(--akzent);
}

.knopf.primaer,
button.primaer {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--auf-akzent);
}

.knopf.primaer:hover,
button.primaer:hover {
  background: color-mix(in srgb, var(--akzent) 88%, var(--schrift));
  color: var(--auf-akzent);
}

.knopf.gefahr,
button.gefahr {
  color: var(--schlecht);
  border-color: color-mix(in srgb, var(--schlecht) 45%, transparent);
}

.knopf.gefahr:hover,
button.gefahr:hover {
  background: var(--schlecht-flaeche);
  color: var(--schlecht);
  border-color: var(--schlecht);
}

.knopf.leise,
button.leise {
  border-color: transparent;
  background: transparent;
  color: var(--leise);
}

.knopf.leise:hover,
button.leise:hover {
  background: var(--flaeche);
  color: var(--schrift);
}

.knopf.klein,
button.klein {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.8125rem;
}

button[aria-current="true"] {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--auf-akzent);
}

button:disabled,
button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--linie);
  color: var(--leise);
  background: var(--flaeche);
}

@media (pointer: coarse) {
  button,
  .knopf {
    min-height: 44px;
  }

  .knopf.klein,
  button.klein {
    min-height: 36px;
  }
}

/* Formulare. */
.feld {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.feld > label,
.feld > .label,
fieldset > legend {
  font-weight: 600;
  font-size: 0.9375rem;
}

.feld .hinweis,
.hinweis {
  color: var(--leise);
  font-size: var(--grad--1);
  margin: 0;
}

/* Der Fehler unter einem Feld trägt `marke schlecht` (Tests suchen danach), sieht aber aus wie Text. */
.feld > .marke.schlecht,
.feld .fehlertext {
  display: block;
  min-height: 0;
  padding: 0;
  background: none;
  color: var(--schlecht);
  font-size: var(--grad--1);
  font-weight: 600;
  white-space: normal;
  margin: 0;
}

.feld > .marke.schlecht::before,
.feld .fehlertext::before {
  content: "⚠ ";
}

input:where(:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"])),
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--linie-stark);
  background: var(--papier);
  color: var(--schrift);
  font: inherit;
  font-size: 1rem;
}

textarea {
  line-height: 1.6;
  resize: vertical;
}

input:where(:not([type="checkbox"], [type="radio"], [type="file"])):hover,
select:hover,
textarea:hover {
  border-color: var(--leise);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--akzent) 60%, transparent);
  outline-offset: 1px;
  border-color: var(--akzent);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
input[aria-invalid="true"]:hover,
textarea[aria-invalid="true"]:hover {
  border-color: var(--schlecht);
}

input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--akzent);
  flex: none;
}

.wahl {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 32px;
  padding-block: 4px;
  cursor: pointer;
}

.wahl input {
  margin-top: 2px;
}

.mit-einheit {
  display: flex;
  align-items: stretch;
}

.mit-einheit input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.mit-einheit span {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--linie-stark);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: var(--flaeche);
  color: var(--leise);
  white-space: nowrap;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-width: 0;
}

fieldset > legend {
  padding: 0;
  margin-bottom: 8px;
}

.formularfuss {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.zwei-spalten {
  display: grid;
  gap: 0 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

/* Hochladen: das native Feld, als große Zone gesetzt. */
.ablage {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 28px 20px;
  border: 1.5px dashed var(--linie-stark);
  border-radius: var(--rund);
  background: var(--grund);
}

.ablage:hover,
.ablage:focus-within {
  border-color: var(--akzent);
  background: var(--akzent-hell);
}

.ablage input[type="file"] {
  max-width: 100%;
  font: inherit;
  font-size: 0.9375rem;
}

.ablage input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  margin-right: 12px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--akzent);
  background: var(--akzent);
  color: var(--auf-akzent);
  cursor: pointer;
}

/* Meldungen: Erfolg nach einer Aktion, Warnung, Fehlerzusammenfassung. */
.meldung {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--rund);
  margin-bottom: 24px;
  background: var(--gut-flaeche);
  color: var(--schrift);
  border: 1px solid color-mix(in srgb, var(--gut) 30%, transparent);
}

.meldung::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gut);
  color: var(--papier);
  font-size: 0.8125rem;
  font-weight: 700;
}

.meldung.warn {
  background: var(--warn-flaeche);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}

.meldung.warn::before {
  content: "!";
  background: var(--warn);
}

.meldung.schlecht {
  background: var(--schlecht-flaeche);
  border-color: color-mix(in srgb, var(--schlecht) 30%, transparent);
}

.meldung.schlecht::before {
  content: "!";
  background: var(--schlecht);
}

.meldung p {
  margin: 0;
}

.meldung ul {
  margin: 6px 0 0;
}

/* Leer: ein Zustand ohne Inhalt sagt, was als Nächstes zu tun ist. */
.leer {
  text-align: center;
  padding: clamp(40px, 8vw, 72px) 20px;
  border: 1.5px dashed var(--linie-stark);
  border-radius: var(--rund-l);
  color: var(--leise);
}

.leer h3 {
  color: var(--schrift);
  margin-bottom: 8px;
}

.leer p {
  max-width: 46ch;
  margin-inline: auto;
}

.leer .aktionen {
  justify-content: center;
  margin-top: 16px;
}

/* Grund: die Erklärung unter einer Sache, leise. */
.grund {
  color: var(--leise);
  font-size: 0.9375rem;
  margin: 12px 0 0;
}

/* Tabellen: am Desktop Tabelle, am Handy Kartenliste (data-titel je Zelle). */
.tabelle {
  overflow-x: auto;
  border: 1px solid var(--linie);
  border-radius: var(--rund-l);
  background: var(--papier);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th {
  text-align: left;
  font-weight: 600;
  color: var(--leise);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--linie);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-top: 1px solid var(--linie);
  vertical-align: top;
}

tbody tr:first-child td {
  border-top: 0;
}

td form {
  margin: 0;
}

@media (max-width: 47.99rem) {
  .tabelle.stapeln {
    border: 0;
    background: none;
    overflow: visible;
  }

  .tabelle.stapeln table,
  .tabelle.stapeln tbody,
  .tabelle.stapeln tr,
  .tabelle.stapeln td {
    display: block;
  }

  .tabelle.stapeln thead {
    display: none;
  }

  .tabelle.stapeln tr {
    background: var(--papier);
    border: 1px solid var(--linie);
    border-radius: var(--rund);
    padding: 8px 16px;
    margin-bottom: 10px;
  }

  .tabelle.stapeln td {
    border: 0;
    padding: 6px 0;
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 12px;
  }

  .tabelle.stapeln td[data-titel]::before {
    content: attr(data-titel);
    color: var(--leise);
    font-size: 0.8125rem;
    font-weight: 600;
  }

  .tabelle.stapeln td:not([data-titel]) {
    grid-template-columns: 1fr;
  }
}

/* Aufklapper: Details, Herkunft, Filter am Handy. */
details.klapp {
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  background: var(--papier);
  margin-bottom: 12px;
}

details.klapp > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

details.klapp > summary::-webkit-details-marker {
  display: none;
}

details.klapp > summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--leise);
  border-bottom: 2px solid var(--leise);
  transform: rotate(45deg);
  margin-right: 4px;
}

details.klapp[open] > summary::after {
  transform: rotate(-135deg);
}

details.klapp > .innen {
  padding: 0 18px 18px;
}

/* Zählbalken (Anschreiben-Deckel, Ausbeute). */
progress {
  appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--flaeche);
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--flaeche);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--akzent);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: var(--akzent);
  border-radius: 999px;
}

progress.voll::-webkit-progress-value {
  background: var(--schlecht);
}

progress.voll::-moz-progress-bar {
  background: var(--schlecht);
}

/* Liste mit Trennlinien, etwa der Verlauf. */
.zeitleiste {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  border-left: 2px solid var(--linie);
}

.zeitleiste li {
  position: relative;
  padding: 0 0 12px 18px;
  color: var(--leise);
  font-size: 0.9375rem;
}

.zeitleiste li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--papier);
  border: 2px solid var(--akzent);
}

.zeitleiste li:last-child {
  padding-bottom: 0;
}

/* Rückfrage vor dem Löschen (zweistufig, ohne JS). */
.rueckfrage {
  border: 1.5px solid color-mix(in srgb, var(--schlecht) 45%, transparent);
  background: var(--schlecht-flaeche);
  border-radius: var(--rund);
  padding: 16px 18px;
  margin: 12px 0;
}

.rueckfrage p {
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------------- Seiten */

/* Übersicht: fünf Zahlen, jede ein Filterlink. */
.uebersicht {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 10px;
  margin-bottom: 32px;
}

.uebersicht a {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  border-radius: var(--rund);
  background: var(--papier);
  border: 1px solid var(--linie);
  text-decoration: none;
}

.uebersicht a:hover {
  border-color: var(--akzent);
}

.uebersicht a[aria-current="true"] {
  border-color: var(--akzent);
  box-shadow: inset 0 0 0 1px var(--akzent);
}

.uebersicht .zahl {
  font-family: var(--serif);
  font-size: var(--grad-3);
  line-height: 1;
}

.uebersicht .was {
  color: var(--leise);
  font-size: var(--grad--1);
  font-weight: 600;
}

.uebersicht a.hervor {
  background: var(--akzent-2);
  border-color: transparent;
}

.uebersicht a.hervor .was {
  color: var(--auf-akzent-2);
}

.uebersicht a.achtung .zahl {
  color: var(--warn);
}

/* Trefferseite: Filter links (Desktop) oder aufklappbar (Handy), Liste rechts. */
.trefferseite {
  display: grid;
  gap: 24px;
  align-items: start;
}

@media (min-width: 64rem) {
  .trefferseite {
    grid-template-columns: 17.5rem minmax(0, 1fr);
    gap: 40px;
  }
}

@supports selector(::details-content) {
  @media (min-width: 64rem) {
    details.filter > summary {
      display: none;
    }

    details.filter::details-content {
      content-visibility: visible;
      display: block;
    }

    details.filter {
      border: 0;
      background: none;
    }

    details.filter > .innen {
      padding: 0;
    }
  }
}

.filter .feld {
  margin-bottom: 16px;
}

.filter fieldset {
  margin-bottom: 16px;
}

/* Häkchen zweispaltig, damit der Filter nicht länger ist als die Liste. */
.filter fieldset.wahlen {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.filter fieldset.wahlen > legend {
  grid-column: 1 / -1;
}

.filter .zaehler {
  font-weight: 500;
  color: var(--leise);
}

.suchzeile {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.suchzeile input {
  flex: 1;
}

.aktive-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.aktive-filter a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 8px 0 12px;
  border-radius: 999px;
  background: var(--akzent-hell);
  color: var(--akzent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.aktive-filter a::after {
  content: "×";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}

.aktive-filter a:hover::after {
  background: color-mix(in srgb, var(--akzent) 18%, transparent);
}

.aktive-filter a.alle {
  background: none;
  color: var(--leise);
}

.aktive-filter a.alle::after {
  content: none;
}

.listenkopf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 12px;
  color: var(--leise);
  font-size: 0.9375rem;
}

/*
 * Die Stellenzeile. Am Handy eine Karte (gestapelt), ab 40 rem Breite der
 * Liste eine Zeile: Initiale | Inhalt | Stand. Der Titel-Link deckt die ganze
 * Zeile (::after), damit der Daumen nicht zielen muss.
 */
.trefferliste {
  container-type: inline-size;
  display: grid;
  gap: 12px;
}

.trefferliste > article.karte {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
  margin: 0;
  padding: 18px;
  border-radius: var(--rund);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.trefferliste > article.karte:hover {
  border-color: var(--linie-stark);
  box-shadow: var(--schatten);
}

.trefferliste > article.karte:focus-within {
  border-color: var(--akzent);
}

.initiale {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--flaeche);
  color: var(--akzent);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  grid-row: span 3;
}

.trefferliste h3 {
  font-size: var(--grad-2);
  margin: 0;
}

.trefferliste h3 a {
  text-decoration: none;
}

.trefferliste h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.trefferliste h3 a:focus-visible {
  outline: none;
}

.trefferliste .firma {
  color: var(--schrift);
  font-weight: 600;
  font-size: 0.9375rem;
}

.trefferliste .zeile {
  grid-column: 2;
}

.trefferliste .rechts {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin-top: 8px;
}

.trefferliste .grund {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--linie);
  font-size: 0.875rem;
}

.trefferliste .rechts time {
  color: var(--leise);
  font-size: 0.875rem;
}

@container (min-width: 40rem) {
  .trefferliste > article.karte {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    padding: 20px 24px;
  }

  .initiale {
    width: 48px;
    height: 48px;
  }

  .trefferliste .rechts {
    grid-column: 3;
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    margin-top: 0;
    text-align: right;
  }
}

.blaettern {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

/* Detail: Inhalt links, Aktionsleiste rechts (klebend); am Handy die Leiste zuerst. */
.detail {
  display: grid;
  gap: 24px;
  align-items: start;
}

.detail > aside {
  display: grid;
  gap: 16px;
}

@media (min-width: 64rem) {
  .detail {
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 40px;
  }

  .detail > aside {
    position: sticky;
    top: calc(var(--kopfhoehe) + 24px);
    grid-column: 2;
    grid-row: 1;
  }

  .detail > div {
    grid-column: 1;
    grid-row: 1;
  }
}

.detail aside .karte {
  margin: 0;
  border-radius: var(--rund-l);
}

.detail aside h3 {
  font-size: var(--grad-1);
  font-family: var(--sans);
  font-weight: 700;
  margin-bottom: 12px;
}

.stand-wahl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stand-wahl button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

/* Trennlinien je Zelle (innen rechts und unten); die der letzten Spalte und Zeile verschwinden unter dem Rand. */
.fakten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  overflow: hidden;
  margin: 0 0 12px;
}

.fakten > div {
  padding: 14px 16px;
  margin: 0 -1px -1px 0;
  box-shadow:
    inset -1px 0 0 var(--linie),
    inset 0 -1px 0 var(--linie);
}

.fakten dd .marke {
  white-space: normal;
}

.fakten dt {
  color: var(--leise);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.fakten dd {
  margin: 0;
  font-weight: 600;
}

.fakten dd .marke {
  font-weight: 600;
}

.regeln {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.regeln li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.regeln .zeichen {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
}

.regeln .zeichen.gut {
  background: var(--gut-flaeche);
  color: var(--gut);
}

.regeln .zeichen.schlecht {
  background: var(--schlecht-flaeche);
  color: var(--schlecht);
}

.regeln .zeichen.offen {
  background: var(--flaeche);
  color: var(--leise);
}

.regeln strong {
  display: block;
}

.regeln span {
  color: var(--leise);
  font-size: 0.9375rem;
}

.brief textarea {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  padding: 20px 24px;
  background: var(--grund);
  max-width: 72ch;
}

.deckel {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.deckel .zeile {
  justify-content: space-between;
}

/* Profile: Karten im Raster. */
.raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 16px;
}

.raster > .karte {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.raster > .karte > form:last-child,
.raster > .karte > .aktionen:last-child {
  margin-top: auto;
}

.eigenschaften {
  display: grid;
  gap: 8px;
  margin: 0;
}

.eigenschaften > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 12px;
}

.eigenschaften dt {
  color: var(--leise);
  font-size: 0.875rem;
}

.eigenschaften dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Schmal: Formularseiten, Anmeldung, Fehlerseiten. */
.schmal {
  max-width: 44rem;
}

.mitte {
  max-width: 30rem;
  margin: clamp(24px, 8vh, 96px) auto 0;
  text-align: center;
}

.mitte .karte {
  text-align: left;
}

.fehlerbild {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(5rem, 4rem + 8vw, 9rem);
  line-height: 0.9;
  color: var(--akzent);
  margin-bottom: 8px;
}

.sparkline {
  display: block;
  font-size: 1.75rem;
  letter-spacing: 1px;
  line-height: 1.1;
  color: var(--akzent);
  background: none;
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
}

/* --------------------------------------------------------------- Bewegung */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  button,
  .knopf,
  .hauptnav > a,
  .uebersicht a {
    transition:
      background-color 0.15s,
      border-color 0.15s,
      color 0.15s,
      box-shadow 0.15s;
  }
}

/* ---------------------------------------------------------------------- Druck */

@media print {
  :root {
    --grund: #fff;
    --papier: #fff;
  }

  .kopf,
  .tableiste,
  .fuss,
  .sprung,
  .keindruck,
  .detail > aside,
  details.klapp,
  .meldung {
    display: none;
  }

  .nur-druck {
    display: block;
    white-space: pre-wrap;
    font-family: var(--serif);
    font-size: 12pt;
    line-height: 1.5;
  }

  .karte {
    border: 0;
    padding: 0;
  }

  body {
    padding: 0;
  }
}

/* Anzeigetext: Klartext, wie die Quelle ihn schrieb (Parserversion 5), in Lesebreite. */
.prosa {
  white-space: pre-line;
  max-width: 72ch;
  font-size: var(--grad-0);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

/* Anmeldung, Einladung, Meldeseiten: eine Karte in der Mitte. */
.mitte > h1 {
  margin-bottom: 8px;
}

.mitte .unterzeile {
  color: var(--leise);
  font-size: var(--grad-1);
  margin: 12px 0 0;
}

.mitte .karte {
  margin-top: 24px;
}
