/*
 * Grundlagen für alle Seiten: Schriften, Farben, Grundtypografie.
 *
 * Liegt unter public/ und nicht in seite/styles/, weil zwei Erzeuger es
 * brauchen: die gebaute Astro-Seite und die Eingabeseite, die der Dienst zur
 * Laufzeit erzeugt. Astro würde die Datei umbenennen (Hash im Namen), der
 * Dienst fände sie dann nicht.
 *
 * Palette „Papier & Tinte“ aus der Saytrue-Oberfläche: warmes Papierweiß,
 * Tinten-Indigo als einziger Akzent. Saytrue kennt nur den hellen Modus; der
 * dunkle hier ist neu und für das Lesen am Abend gedacht. Kontraste siehe
 * docs/reference/gestaltung.md.
 */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Source Serif 4";
  src: url("/fonts/source-serif-4-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-600-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Inter";
  src: url("/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Inter";
  src: url("/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-600-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Farben --- */

:root {
  color-scheme: light dark;

  /* Saytrue ADR-099, Werte unverändert übernommen */
  --papier: hsl(40 25% 97.5%);
  --papier-erhoben: hsl(40 25% 99.5%);
  --flaeche: hsl(40 15% 94%);
  --tinte: hsl(220 20% 18%);
  --tinte-leise: hsl(220 10% 38%);
  --akzent: hsl(225 45% 35%);
  --akzent-hover: hsl(225 50% 27%);
  --akzent-auf: hsl(0 0% 100%);
  --rahmen: hsl(220 15% 88%);
  --warnung: hsl(0 50% 40%);
  --warnung-flaeche: hsl(0 50% 96%);
  --erfolg: hsl(145 35% 30%);
  --erfolg-flaeche: hsl(145 35% 95%);
  --zitat-linie: hsl(225 30% 75%);

  --schrift-lesen: "Source Serif 4", "Iowan Old Style", "Georgia", serif;
  --schrift-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 6px;
  --radius-gross: 8px;
  --schatten: 0 1px 2px hsl(220 20% 18% / 0.06), 0 1px 1px hsl(220 20% 18% / 0.04);
  --breite-text: 38rem;
  --breite-seite: 60rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: hsl(222 18% 11%);
    --papier-erhoben: hsl(222 16% 14%);
    --flaeche: hsl(222 14% 17%);
    --tinte: hsl(40 20% 88%);
    --tinte-leise: hsl(40 8% 68%);
    --akzent: hsl(225 70% 78%);
    --akzent-hover: hsl(225 80% 86%);
    --akzent-auf: hsl(222 18% 11%);
    --rahmen: hsl(222 12% 24%);
    --warnung: hsl(0 70% 75%);
    --warnung-flaeche: hsl(0 30% 18%);
    --erfolg: hsl(145 40% 70%);
    --erfolg-flaeche: hsl(145 25% 15%);
    --zitat-linie: hsl(225 30% 40%);
    --schatten: none;
  }
}

/* --- Grundlagen --- */

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--akzent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

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

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

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

.sprungmarke {
  position: absolute;
  left: 1rem;
  top: 0;
  /* Um die eigene Höhe nach oben statt um ein festes Maß: Bei 200 % Schrift
     und 360 px Breite bricht der Text um, und mit top: -4rem ragte der untere
     Rand ins Bild (gesehen am 11.11.2026). */
  transform: translateY(calc(-100% - 1rem));
  padding: 0.5rem 1rem;
  background: var(--akzent);
  color: var(--akzent-auf);
  border-radius: var(--radius);
  z-index: 10;
}

.sprungmarke:focus {
  top: 1rem;
  transform: none;
}

/* Schaltflächen teilen Seite und Eingabeseite */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--akzent);
  border-radius: var(--radius);
  background: var(--akzent);
  color: var(--akzent-auf);
  font: 600 1rem/1.2 var(--schrift-ui);
  text-decoration: none;
  cursor: pointer;
}

.knopf:hover {
  background: var(--akzent-hover);
  border-color: var(--akzent-hover);
  color: var(--akzent-auf);
}

.knopf--leise {
  background: transparent;
  color: var(--akzent);
}

.knopf--leise:hover {
  background: var(--flaeche);
  color: var(--akzent-hover);
}

.knopf--warnung {
  background: transparent;
  border-color: var(--warnung);
  color: var(--warnung);
}

.knopf--warnung:hover {
  background: var(--warnung-flaeche);
  border-color: var(--warnung);
  color: var(--warnung);
}

@media (prefers-contrast: more) {
  :root {
    --rahmen: var(--tinte-leise);
  }
}

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