/* ======================================================================
   Framerate - Gestaltung der Publikation.
   Farben und Formensprache stammen aus dem Logo: fast schwarzer Grund,
   violetter Akzent, kursive Versalien. Bewusst durchgehend dunkel -
   die Marke ist dunkel, ein heller Zwilling wäre eine andere Marke.
   ====================================================================== */

:root {
  /* Sagt dem Browser, dass Bedienelemente dunkel zu zeichnen sind:
     Auswahllisten, Bildlaufleisten, Datumswähler, Markierungsfarbe.
     Ohne diese Zeile malt das Betriebssystem die Klappliste weiß. */
  color-scheme: dark;

  --grund:       #030509;   /* Hintergrund, direkt aus dem Logo */
  --flaeche:     #0a0d14;   /* Karten, Felder */
  --flaeche-2:   #11151f;   /* gehobene Fläche */
  --linie:       #1e2430;
  --linie-hell:  #2b3342;
  --text:        #e9ebf0;
  --text-leise:  #8b93a5;
  --akzent:      #5706fe;   /* Markenviolett, für Flächen */
  --akzent-hell: #a07cff;   /* aufgehellt, für Text und Links */
  --akzent-tief: #2d0480;
  --fehler:      #ff6b74;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  --spalte: 40rem;
  --breit:  74rem;
}

* { box-sizing: border-box; }

/* 100vw schließt die Bildlaufleiste ein, randlose Bilder ragen dadurch
   auf dem PC seitlich heraus. 'clip' schneidet das ab, ohne - anders als
   'hidden' - einen Scrollbereich zu erzeugen; klebende Kopfzeilen
   funktionieren weiter. */
html, body { overflow-x: clip; }

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--akzent-hell); text-decoration-color: color-mix(in srgb, var(--akzent-hell) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

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

.mitte  { width: 100%; max-width: var(--breit); margin: 0 auto; padding: 0 22px; }
.schmal { max-width: var(--spalte); }
.klein  { font-size: 13px; color: var(--text-leise); }

.sprung { position: absolute; left: -9999px; background: var(--akzent); color: #fff; padding: 10px 16px; font-size: 14px; z-index: 20; }
.sprung:focus { left: 8px; top: 8px; }

/* --- Kopfzeile ---------------------------------------------------- */
.kopf {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--grund) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linie);
}
/* Der violette Lichtstreif aus dem Logo, als feine Kante. */
.kopf::after {
  content: ""; display: block; height: 1px;
  background: linear-gradient(90deg, transparent, var(--akzent) 35%, var(--akzent-hell) 50%, var(--akzent) 65%, transparent);
  opacity: 0.75;
}
.kopf-innen { display: flex; align-items: center; gap: 26px; padding: 14px 22px; max-width: var(--breit); margin: 0 auto; }
.wortmarke { display: block; flex-shrink: 0; }
.wortmarke img { display: block; width: 168px; height: auto; }
.navi { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; font-size: 14px; }
.navi a {
  color: var(--text-leise); text-decoration: none;
  font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.navi a:hover, .navi a[aria-current="page"] { color: var(--text); border-bottom-color: var(--akzent); }

/* --- Überschriften ------------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; font-weight: 800; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }

/* Kursive Versalien - die Formensprache des Logos. */
.augenbraue, .rubrikmarke {
  display: inline-block;
  font-size: 11px; font-weight: 800; font-style: italic;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--akzent-hell); margin: 0 0 10px;
}
.rubrikmarke { text-decoration: none; }
.rubrikmarke:hover { color: #fff; }

.zeile { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--text-leise); }
.zeile time { white-space: nowrap; }

/* --- Startseite ----------------------------------------------------- */
.aufmacher { padding: 44px 0 40px; border-bottom: 1px solid var(--linie); }
.aufmacher-bild { display: block; margin-bottom: 26px; border: 1px solid var(--linie); }
.aufmacher h1 { font-size: clamp(32px, 6vw, 58px); margin-bottom: 16px; }
.aufmacher .anriss { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-leise); max-width: 46rem; margin: 0 0 18px; }
.aufmacher a.titel-link { color: inherit; text-decoration: none; }
.aufmacher a.titel-link:hover h1 { color: var(--akzent-hell); }

.raster { display: grid; gap: 34px 28px; grid-template-columns: 1fr; padding: 40px 0; }
.karte-beitrag { display: flex; flex-direction: column; min-width: 0; }
.karte-beitrag .bildfeld { display: block; margin-bottom: 14px; border: 1px solid var(--linie); background: var(--flaeche); aspect-ratio: 16/9; overflow: hidden; }
.karte-beitrag .bildfeld img { width: 100%; height: 100%; object-fit: cover; }
.karte-beitrag h2 { font-size: 20px; margin-bottom: 8px; }
.karte-beitrag h2 a { color: inherit; text-decoration: none; }
.karte-beitrag h2 a:hover { color: var(--akzent-hell); }
.karte-beitrag p { color: var(--text-leise); font-size: 15px; margin: 0 0 12px; }

.leer { padding: 64px 0; color: var(--text-leise); }

/* --- Beitrag -------------------------------------------------------- */
.beitrag-kopf { padding: 40px 0 26px; }
.beitrag-kopf h1 { margin-bottom: 18px; }
.beitrag-kopf .anriss { font-size: 20px; color: var(--text-leise); margin: 0 0 22px; }
.titelbild { margin: 0 0 36px; border: 1px solid var(--linie); }
.titelbild img { display: block; width: 100%; }
.titelbild figcaption { font-size: 13px; color: var(--text-leise); padding: 10px 14px; background: var(--flaeche); }

.beitragstext { font-size: 18px; line-height: 1.78; }
.beitragstext > p, .beitragstext > h2, .beitragstext > h3, .beitragstext > ul,
.beitragstext > ol, .beitragstext > blockquote, .beitragstext > pre, .beitragstext > table {
  max-width: var(--spalte);
}
.beitragstext h2 { margin: 44px 0 12px; }
.beitragstext h3 { margin: 32px 0 10px; }
.beitragstext p { margin: 0 0 20px; }
.beitragstext a { text-decoration: underline; }
.beitragstext blockquote {
  margin: 30px 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--akzent); color: var(--text);
  font-size: 20px; line-height: 1.55;
}
.beitragstext pre {
  background: var(--flaeche); border: 1px solid var(--linie);
  padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.55;
}
.beitragstext code { font-family: var(--mono); font-size: 0.88em; }
.beitragstext :not(pre) > code { background: var(--flaeche-2); padding: 2px 6px; border: 1px solid var(--linie); }
.beitragstext table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.beitragstext th, .beitragstext td { border-bottom: 1px solid var(--linie); padding: 10px 14px; text-align: left; }
.beitragstext th { font-weight: 700; color: var(--text); border-bottom-color: var(--linie-hell); }
.beitragstext hr { border: 0; border-top: 1px solid var(--linie); margin: 40px 0; }

.beitrag-fuss { margin: 56px 0 0; padding: 28px 0 0; border-top: 1px solid var(--linie); }

/* --- Bildblöcke ------------------------------------------------------ */
.bild { margin: 38px 0; }
.bild img { display: block; width: 100%; height: auto; background: var(--flaeche); }
.bild figcaption { font-size: 13px; line-height: 1.55; color: var(--text-leise); margin-top: 10px; max-width: var(--spalte); }

.bild--standard { max-width: var(--spalte); }
.bild--breit    { max-width: min(100%, 60rem); }
.bild--voll     { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.bild--voll figcaption { max-width: var(--spalte); margin: 10px auto 0; padding: 0 22px; }

.galerie-raster { display: grid; gap: 10px; grid-template-columns: 1fr; }

.bild--vergleich .vergleich-buehne { position: relative; overflow: hidden; }
.bild--vergleich .vergleich-nachher { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.bild--vergleich .vergleich-nachher img { width: auto; max-width: none; height: 100%; }
.vergleich-marke {
  position: absolute; bottom: 12px; left: 12px;
  font-size: 11px; font-weight: 800; font-style: italic; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(3,5,9,0.82); color: #fff; padding: 5px 10px; border: 1px solid var(--linie-hell);
}
.bild--vergleich .vergleich-nachher .vergleich-marke { left: auto; right: 12px; }
.vergleich-regler { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; appearance: none; background: transparent; cursor: ew-resize; }
.vergleich-regler::-webkit-slider-thumb { appearance: none; width: 3px; height: 100%; background: var(--akzent-hell); box-shadow: 0 0 12px var(--akzent); }
.vergleich-regler::-moz-range-thumb { width: 3px; height: 100%; border: 0; border-radius: 0; background: var(--akzent-hell); box-shadow: 0 0 12px var(--akzent); }

/* --- Archiv und Listen ----------------------------------------------- */
.jahr { font-size: 13px; font-weight: 800; font-style: italic; letter-spacing: 0.16em; color: var(--text-leise); margin: 44px 0 14px; text-transform: uppercase; }
.archivliste { list-style: none; padding: 0; margin: 0; }
.archivliste li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 15px 0; border-bottom: 1px solid var(--linie); }
.archivliste a { color: var(--text); text-decoration: none; font-weight: 600; }
.archivliste a:hover { color: var(--akzent-hell); }

.rubrikleiste { display: flex; gap: 10px; flex-wrap: wrap; padding: 26px 0; border-bottom: 1px solid var(--linie); }
.rubrikleiste a {
  font-size: 13px; font-weight: 700; text-decoration: none;
  color: var(--text-leise); border: 1px solid var(--linie);
  padding: 7px 14px;
}
.rubrikleiste a:hover, .rubrikleiste a[aria-current="page"] { color: #fff; border-color: var(--akzent); background: var(--akzent-tief); }

/* --- Autor ------------------------------------------------------------ */
.autorkopf { padding: 44px 0 30px; border-bottom: 1px solid var(--linie); }
.autorkopf .bio { font-size: 18px; color: var(--text-leise); max-width: var(--spalte); }
.qualifikation { margin-top: 22px; padding: 18px 20px; background: var(--flaeche); border: 1px solid var(--linie); max-width: var(--spalte); }
.qualifikation h2 { font-size: 13px; font-style: italic; letter-spacing: 0.14em; text-transform: uppercase; color: var(--akzent-hell); margin-bottom: 8px; }
.qualifikation p { margin: 0; font-size: 15px; color: var(--text-leise); }

/* --- Statische Seiten -------------------------------------------------- */
.seitentext { padding: 40px 0 20px; font-size: 17px; }
.seitentext h1 { margin-bottom: 26px; }
.seitentext h2 { font-size: 20px; margin: 36px 0 10px; }
.seitentext p, .seitentext ul, .seitentext ol { max-width: var(--spalte); margin: 0 0 18px; }
.seitentext address { font-style: normal; margin: 0 0 18px; }

/* --- Karten (Anmeldung, Fehler) ---------------------------------------- */
.karte { background: var(--flaeche); border: 1px solid var(--linie); padding: 34px 30px; margin: 44px 0; }
.karte h1 { font-size: 26px; }

/* --- Formulare ---------------------------------------------------------- */
label { display: block; font-size: 13px; font-weight: 700; margin: 18px 0 6px; }
input[type=email], input[type=password], input[type=text], input[type=search],
input[type=datetime-local], select, textarea {
  width: 100%; padding: 11px 13px;
  font-family: inherit; font-size: 15px;
  color: var(--text); background: var(--grund);
  border: 1px solid var(--linie-hell); border-radius: 0;
}
input::placeholder, textarea::placeholder { color: #6b7385; }

/* Die Einträge der Klappliste zeichnet das Betriebssystem, nicht die Seite.
   Farben deshalb ausdrücklich setzen - sonst steht Weiß auf Weiß. */
option, optgroup {
  background: #11151f;
  color: #e9ebf0;
}
option:checked { background: #2d0480; }

select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%238b93a5' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px;
}

input[type="datetime-local"] { min-height: 44px; }
textarea { resize: vertical; line-height: 1.6; }

button {
  margin-top: 22px; padding: 12px 22px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  color: #fff; background: var(--akzent);
  border: 1px solid var(--akzent); border-radius: 0; cursor: pointer;
}
button:hover { background: #4a05d8; }
button.leise { margin: 0; padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--text-leise); background: transparent; border-color: var(--linie-hell); }
button.leise:hover { color: var(--text); border-color: var(--text-leise); background: transparent; }

.fehler { font-size: 14px; color: var(--fehler); border-left: 3px solid var(--fehler); padding: 8px 0 8px 12px; margin: 0 0 12px; }
.hinweis { font-size: 14px; border-left: 3px solid var(--akzent); padding: 8px 0 8px 12px; margin: 0 0 16px; color: var(--text-leise); }

/* --- Fußzeile ----------------------------------------------------------- */
.fuss { border-top: 1px solid var(--linie); margin-top: 80px; padding: 40px 0 56px; font-size: 14px; color: var(--text-leise); }
.fuss-innen { display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; }
.fuss img { width: 128px; opacity: 0.85; margin-bottom: 12px; }
.fuss a { color: var(--text-leise); }
.fuss a:hover { color: var(--text); }
.fuss-links { display: flex; gap: 18px; flex-wrap: wrap; }
.claim { font-size: 11px; font-weight: 800; font-style: italic; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-leise); }

/* --- Ab Tablet ------------------------------------------------------------ */
@media (min-width: 640px) {
  .raster { grid-template-columns: repeat(2, 1fr); }
  .archivliste li { grid-template-columns: 9.5rem 1fr; gap: 18px; align-items: baseline; }
  .galerie-raster { grid-template-columns: repeat(2, 1fr); }
  .bild--galerie[data-anzahl="3"] .galerie-raster { grid-template-columns: repeat(3, 1fr); }
  .bild--galerie[data-anzahl="4"] .galerie-raster { grid-template-columns: repeat(4, 1fr); }
  .bild--links, .bild--rechts { max-width: 46%; margin-top: 8px; }
  .bild--links  { float: left;  margin-right: 28px; }
  .bild--rechts { float: right; margin-left: 28px; }
  .beitragstext h2, .beitragstext h3 { clear: both; }
}

@media (min-width: 1000px) {
  body { font-size: 18px; }
  .raster { grid-template-columns: repeat(3, 1fr); }
  .aufmacher { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
  .aufmacher-bild { margin-bottom: 0; }
}

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

/* Vorschauband über einem noch nicht veröffentlichten Beitrag. */
.vorschauband {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center;
  background: var(--akzent-tief); border-bottom: 1px solid var(--akzent);
  padding: 11px 22px; font-size: 14px; color: #fff;
}
.vorschauband a { color: #fff; }


/* ======================================================================
   Handy und Tablet. Alles hier greift ausschließlich unter 640 Pixel
   oder bei Fingerbedienung - die Darstellung am PC bleibt unverändert.
   ====================================================================== */

@media (max-width: 639px) {
  /* iOS Safari zoomt in Felder unter 16px hinein. */
  input[type=email], input[type=password], input[type=text], input[type=search],
  input[type=datetime-local], select, textarea { font-size: 16px; }

  /* Deutsche Komposita sprengen sonst die Zeile. */
  body { overflow-wrap: break-word; }
  h1, h2, h3 { hyphens: auto; }
  .beitragstext { hyphens: auto; text-align: left; }

  /* Kopfzeile: Wortmarke oben, Rubriken darunter in einer Zeile,
     seitlich schiebbar statt auf drei Zeilen umgebrochen. */
  .kopf-innen { flex-wrap: wrap; gap: 10px; padding: 12px 0 0; }
  .wortmarke { padding-left: 22px; }
  .wortmarke img { width: 148px; }
  .navi {
    margin-left: 0; width: 100%; flex-wrap: nowrap; gap: 16px;
    overflow-x: auto; scrollbar-width: none;
    padding: 0 22px 10px; -webkit-overflow-scrolling: touch;
  }
  .navi::-webkit-scrollbar { display: none; }
  .navi a { white-space: nowrap; }

  /* Randlose Bilder: die Bildunterschrift braucht wieder Seitenabstand. */
  .bild--voll figcaption { padding: 0 22px; }

  .aufmacher { padding: 28px 0 30px; }
  .beitrag-kopf { padding: 26px 0 20px; }
  .raster { gap: 30px 0; padding: 30px 0; }
  .fuss-innen { gap: 22px; }
}

/* Fingerbedienung, unabhängig von der Fensterbreite. */
@media (pointer: coarse) {
  .navi a, .rnavi a, .fuss-links a { padding-top: 9px; padding-bottom: 9px; }
  button, .zurueck, .leise-link { min-height: 44px; }
  .werkzeugleiste button { min-height: 44px; min-width: 44px; }
  .medienfeld { min-height: 44px; }
}
