/* replytor — Gestaltung nach docs/marke/ci-handbuch.md.
   Keine Schriften von fremden Servern: Der Stapel bleibt die Produktionsfassung,
   bis PT Serif und PT Sans selbst ausgeliefert werden. */

:root {
  --sand-50: #fbf6f0;
  --sand-100: #f4ebe1;
  --sand-200: #e8dacb;
  --sand-300: #d9c6b2;
  --ink-900: #2a1f19;
  --ink-700: #4a3a31;
  --ink-500: #6e5a4c;
  --clay-600: #b4532f;
  --clay-700: #97401f;
  --clay-050: #f7e7de;
  --moos-600: #5a6e4f;
  --honig-500: #c98a2e;
  --honig-050: #f8eeda;

  --grund: var(--sand-50);
  --flaeche: var(--sand-100);
  --linie: var(--sand-200);
  --text: var(--ink-900);
  --text-leise: var(--ink-500);
  --akzent: var(--clay-600);
  --akzent-text: var(--clay-700);
  --akzent-flaeche: var(--clay-050);
  --hinweis-flaeche: var(--honig-050);
  --hinweis-linie: var(--honig-500);
  --karte: #ffffff;

  /* PT Serif zuerst: die Wortmarke ist in PT Serif ausgelegt, die Überschriften
     sollen dazu passen. Auf Systemen ohne PT Serif greift die bisherige Kette. */
  --titel: "PT Serif", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --fliess: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --breite: 72rem;
  --spalte: 38rem;
  --radius: 16px;
  --radius-gross: 24px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #241a15;
    --flaeche: #2e221b;
    --linie: #43332a;
    --text: #f4ebe1;
    --text-leise: #c4ae9c;
    --akzent: #e58a66;
    --akzent-text: #f0a488;
    --akzent-flaeche: #3a2620;
    --hinweis-flaeche: #372a1c;
    --hinweis-linie: #d5a352;
    --karte: #2e221b;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--fliess);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--titel);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 0.5rem;
  font-family: var(--fliess);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--akzent-text); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

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

strong { font-weight: 600; }

.sprung {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1.25rem;
  background: var(--akzent);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}
.sprung:focus { left: 0; z-index: 10; }

/* Kopf */

.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--linie);
}

.marke { display: inline-flex; flex: 0 0 auto; }
.marke img { display: block; width: 150px; height: auto; }

.navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-inline-end: auto;
}

.navigation a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.navigation a:hover { border-bottom-color: var(--linie); }
.navigation a[aria-current="page"] { border-bottom-color: var(--akzent); }

.sprachen { display: flex; gap: 0.25rem; }

.sprachen a {
  min-width: 2.5rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--linie);
  border-radius: 999px;
  color: var(--text-leise);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
}
.sprachen a:hover { border-color: var(--akzent); color: var(--akzent-text); }
.sprachen a[aria-current="true"] {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
}

/* Grundraster */

main {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) 4rem;
}

.block, .hero, .hinweis, .abschluss { margin: clamp(3rem, 7vw, 5.5rem) 0; }

.block > p, .block__fuehrung, .block--prosa p { max-width: var(--spalte); }

.block__fuehrung {
  margin: -0.25rem 0 2rem;
  color: var(--text-leise);
  font-size: 1.125rem;
}

/* Hero */

.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .hero--einspaltig { grid-template-columns: 1fr; }
}

.hero--einspaltig .hero__text { max-width: 46rem; }

.auszeichnung {
  margin: 0 0 1rem;
  color: var(--akzent-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fuehrung {
  max-width: var(--spalte);
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  color: var(--ink-700);
}

@media (prefers-color-scheme: dark) {
  .fuehrung { color: var(--text-leise); }
}

.aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.knopf {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.knopf:hover { border-color: var(--akzent); color: var(--akzent-text); }

.knopf--primaer {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
}
.knopf--primaer:hover { background: var(--clay-700); border-color: var(--clay-700); color: #fff; }

@media (prefers-color-scheme: dark) {
  .knopf--primaer { color: #241a15; }
  .knopf--primaer:hover { background: #f0a488; border-color: #f0a488; color: #241a15; }
}

/* Dialogbeispiel */

.dialog {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
}

.dialog figcaption {
  margin-bottom: 1.25rem;
  color: var(--text-leise);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog__rolle {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--text-leise);
  font-size: 0.8125rem;
  font-weight: 600;
}

.dialog__frage p, .dialog__antwort p {
  margin: 0;
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius);
}

.dialog__frage { margin-bottom: 1rem; }
.dialog__frage p {
  background: var(--grund);
  border: 1px solid var(--linie);
  border-bottom-left-radius: 4px;
}

.dialog__antwort p {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--akzent);
  border-bottom-right-radius: 4px;
}

.beleg {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding-top: 0.875rem;
  border-top: 1px solid var(--linie);
}

.beleg__marke {
  color: var(--text-leise);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.beleg code {
  padding: 0.25rem 0.5rem;
  background: var(--akzent-flaeche);
  border-radius: 6px;
  color: var(--akzent-text);
  font-size: 0.8125rem;
}

/* Karten */

.karten {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.karte {
  padding: 1.5rem;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}

.karte p { color: var(--text-leise); margin: 0; }

/* Schritte */

.schritte {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: schritt;
}

.schritte li {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 3.75rem;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  counter-increment: schritt;
}

.schritte li::before {
  content: counter(schritt);
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--akzent-flaeche);
  border-radius: 999px;
  color: var(--akzent-text);
  font-size: 0.875rem;
  font-weight: 700;
}

.schritte p { color: var(--text-leise); margin: 0; }

/* Tabelle */

.tabelle-rahmen {
  overflow-x: auto;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}

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

th, td {
  padding: 0.75rem 1rem;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--linie);
}

thead th {
  background: var(--flaeche);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody th { font-weight: 600; }
tbody td { color: var(--text-leise); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* Hinweis */

.hinweis {
  max-width: var(--spalte);
  padding: 1.5rem;
  background: var(--hinweis-flaeche);
  border: 1px solid var(--linie);
  border-left: 4px solid var(--hinweis-linie);
  border-radius: var(--radius);
}

.hinweis h2 { font-size: 1.25rem; font-family: var(--fliess); }

/* Definitionen und Fragen */

.definitionen, .fragen { margin: 0; max-width: var(--spalte); }

.definitionen dt, .fragen dt {
  margin-top: 1.5rem;
  font-weight: 600;
}
.definitionen dt:first-child, .fragen dt:first-child { margin-top: 0; }

.definitionen dd, .fragen dd {
  margin: 0.25rem 0 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--linie);
  color: var(--text-leise);
}

.fragen dt { font-family: var(--titel); font-size: 1.1875rem; }

/* Abschluss */

.abschluss {
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--akzent-flaeche);
  border-radius: var(--radius-gross);
  text-align: center;
}

.abschluss p { max-width: 34rem; margin-inline: auto; color: var(--ink-700); }
.abschluss .aktionen { justify-content: center; }

@media (prefers-color-scheme: dark) {
  .abschluss p { color: var(--text-leise); }
}

/* Fuß */

.fuss {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid var(--linie);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.fuss__satz {
  max-width: 34rem;
  margin: 0;
  color: var(--text-leise);
  font-family: var(--titel);
  font-size: 1.0625rem;
}

.fuss nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.fuss nav a { color: var(--text-leise); font-size: 0.9375rem; }

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