/* Manrope (SIL Open Font License), lokal eingebunden statt über Google-Server */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #1f1c18;
  --muted: #6b645a;
  --line: #e4ddd1;
  --accent: #b3263a;
  --accent-soft: #f6e3e5;
  --green: #2f6b4f;
  --maxw: 1100px;
  --serif: "Georgia", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --surface: #1f1c19;
    --text: #ece6dc;
    --muted: #a39a8c;
    --line: #34302a;
    --accent: #e0606f;
    --accent-soft: #3a2226;
    --green: #6fb592;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

a { color: inherit; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* Kopfbereich */
.site-header {
  border-bottom: 3px double var(--line);
  background: var(--surface);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

/* Wetter-Widget in der Kopfzeile */
.topbar { align-items: center; }

.weather.wx-ready {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}
.wx-link {
  display: flex;
  align-items: center;
  gap: inherit;
  text-decoration: none;
}

.wx-place { font-weight: 600; color: var(--text); }

.wx-day {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wx-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wx-icon .wx-fill { fill: var(--surface); }
.wx-icon .wx-dot { fill: var(--text); stroke: none; }

.wx-short { display: none; }

.wx-max { font-weight: 600; color: var(--text); }
.wx-min::before { content: "/"; }

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

.brand {
  text-align: center;
  padding: 28px 0 18px;
}

.brand a { text-decoration: none; }

.brand .logo {
  font-family: "Manrope", var(--sans);
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  color: var(--text);
  line-height: 1;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Icon hat weißen Hintergrund: im hellen Modus wegmultiplizieren, im dunklen invertieren */
.brand .logo-icon {
  display: block;
  height: 0.85em;
  width: auto;
  /* Das PNG hat rund 20 % Rand um das Symbol */
  margin-right: -0.04em;
  /* optisch auf die Höhe der Wortmarke ausrichten */
  transform: translateY(0.035em);
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  .brand .logo-icon {
    filter: invert(1);
    mix-blend-mode: screen;
  }
}

.brand .tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: clamp(17px, 2.6vw, 22px);
  margin: 8px 0 0;
}

/* Lattenzaun als Zierleiste */
.fence {
  height: 18px;
  background:
    linear-gradient(var(--line), var(--line)) 0 9px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 22px);
  opacity: 0.9;
  margin-top: 16px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  padding: 10px 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.nav a { text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }

/* Startseite */
main { padding: 32px 0 56px; }

.lead-story {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.lead-story .visual { min-height: 260px; }

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.2;
  margin: 0 0 10px;
}

.lead-story h2 { font-size: clamp(28px, 4vw, 40px); }

.lead-story h2 a,
.card h3 a { text-decoration: none; }

.meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  display: flex;
  flex-direction: column;
}

.card .visual { height: 170px; margin-bottom: 14px; }

.card h3 { font-size: 22px; }

.card p { margin: 0 0 8px; }

.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

.section-title {
  font-family: var(--serif);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 2px solid var(--text);
  padding-bottom: 6px;
  margin: 0 0 20px;
}

.sidebar .box,
.wetter .box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.sidebar h4 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 10px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 15px;
}

.sidebar li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.sidebar li:first-child { border-top: 0; padding-top: 0; }

.sidebar .date {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0 0 8px; font-weight: 600; }

/* Vorschaubilder auf der Startseite */
.visual {
  border-radius: 6px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--line);
}

/* Artikelfotos mit Bildnachweis */
.photo { margin: 8px 0 28px; }

.photo img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--line);
}

.photo figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.photo .credit { display: block; margin-top: 2px; font-size: 12px; }

.credits { font-size: 15px; }

.photo .credit a,
.credits a { color: inherit; }

/* Artikelseite */
.article {
  max-width: 720px;
  margin: 0 auto;
}

.article h1 { font-size: clamp(30px, 5vw, 44px); }

.article .standfirst {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--muted);
  margin: 0 0 20px;
}


.article h2 { font-size: 24px; margin-top: 32px; }

.article blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
}

.back {
  display: inline-block;
  margin-top: 36px;
  font-weight: 600;
  text-decoration: none;
}

.infobox {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 24px 0;
}

/* Quellenangabe unter Artikeln */
.source {
  margin: 32px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.source a { color: inherit; }

/* Autor unter Artikeln und Autorenseite */
.author-box {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 32px 0 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
}

.author-box > a { flex: none; }

.author-box img,
.author-head img {
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.author-box img {
  width: 80px;
  height: 80px;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line);
}

.author-box p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.author-box .author-label {
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.author-box .author-name { margin-bottom: 4px; font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--text); }
.author-box .author-name a { color: inherit; text-decoration: none; }
.author-box .author-name a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 480px) {
  .author-box { gap: 14px; padding: 16px; }
  .author-box img { width: 64px; height: 64px; }
}

.author-head {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 8px;
}

.author-head img { width: 160px; height: 160px; flex: none; }
.author-head h1 { margin: 0; }
.author-role { margin: 4px 0 0; color: var(--muted); }
.author-articles li { margin-bottom: 8px; }
.author-articles .meta { margin-left: 6px; white-space: nowrap; }

@media (max-width: 600px) {
  .author-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .author-head img { width: 120px; height: 120px; }
}

.sidebar li a { color: inherit; text-decoration: none; }
.sidebar li a:hover { color: var(--accent); }

.box-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.box-note a { color: inherit; }

.infobox p { margin: 0 0 6px; }
.infobox p:last-child { margin-bottom: 0; }

/* Regenradar: Kartengrundlage, Radarbild und Ortsnamen übereinander */
.radar-map {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--line);
}

.radar-map img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.radar-rain { opacity: 0; transition: opacity .2s; }
.radar-ready .radar-rain { opacity: .85; }
.radar-forecast .radar-rain { opacity: .6; }

.radar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.radar-play {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.radar-play svg { width: 16px; height: 16px; fill: currentColor; }
.radar-play .i-pause,
.radar-play[aria-pressed="true"] .i-play { display: none; }
.radar-play[aria-pressed="true"] .i-pause { display: inline; }

.radar-range { flex: 1; min-width: 0; accent-color: var(--accent); }

.radar-time {
  flex: none;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* Farbskala des DWD-Radars, vereinfacht */
.radar-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  font-size: 12px;
  color: var(--muted);
  background: linear-gradient(90deg, #8ff 0%, #0cc 12%, #090 25%, #9c0 37%, #ff0 50%, #f90 62%, #f00 75%, #33f 87%, #c0c 100%) top / 100% 6px no-repeat;
}

/* Wetterseite */
.wetter h1 { font-size: clamp(30px, 5vw, 40px); }
.wetter h2 { font-size: 22px; }
.wetter .standfirst {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 720px;
}

.wx-top {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  align-items: start;
}

.wx-loading, .wx-error { color: var(--muted); }

.wx-now-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 18px;
}

.wx-icon.wx-icon-lg { width: 64px; height: 64px; stroke-width: 1.3; }
.wx-now-temp { font-family: "Manrope", var(--sans); font-size: 56px; font-weight: 800; line-height: 1; }
.wx-now-label { font-size: 18px; color: var(--muted); }

.wx-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 0;
}

.wx-facts dt { font-size: 13px; color: var(--muted); }
.wx-facts dd { margin: 0; font-weight: 600; }

.wx-section { margin-top: 36px; }

.wx-hours-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.wx-hours-list li {
  position: relative;
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 14px;
}

.wx-hours-list .wx-icon { width: 24px; height: 24px; }
.wx-h { color: var(--muted); font-size: 13px; }
.wx-t { font-weight: 700; }
.wx-p { font-size: 12px; color: #2b6c99; }

.wx-table-wrap { overflow-x: auto; }

.wx-days {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.wx-days th, .wx-days td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.wx-days thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.wx-days tbody tr:last-child > * { border-bottom: 0; }
.wx-cond { display: inline-flex; align-items: center; gap: 8px; }
.wx-cond .wx-icon { width: 22px; height: 22px; }
.wx-sub { display: block; font-size: 12px; color: var(--muted); }

/* Wetterwarnungen nach DWD-Warnstufe */
.wx-alerts { margin-bottom: 24px; }
.wx-alert {
  margin: 0 0 12px;
  padding: 14px 18px;
  border-radius: 6px;
  border-left: 6px solid #e5c100;
  background: var(--surface);
}

.wx-alert h2 { font-size: 19px; margin: 0 0 4px; }
.wx-alert p { margin: 6px 0 0; }
.wx-alert-time { font-size: 14px; color: var(--muted); }
.wx-sev-moderate { border-left-color: #f08c00; }
.wx-sev-severe { border-left-color: #d6202a; }
.wx-sev-extreme { border-left-color: #8e1b8e; }
.wx-alert-none { border-left-color: var(--green); color: var(--muted); }

@media (prefers-color-scheme: dark) {
  .wx-p { color: #7fb7dc; }
}

@media (max-width: 800px) {
  .wx-top { grid-template-columns: 1fr; }
}

/* Rechtliches */
.legal {
  max-width: 720px;
  margin: 0 auto;
}

.legal h1 { font-size: clamp(30px, 5vw, 40px); }
.legal h2 { font-size: 22px; margin-top: 28px; }
.legal address { font-style: normal; }
.legal code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.legal pre {
  margin: 16px 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* Fußbereich */
.site-footer {
  border-top: 3px double var(--line);
  background: var(--surface);
  font-size: 14px;
  color: var(--muted);
  padding: 24px 0 32px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer nav a { margin-right: 16px; }

.site-footer nav .footer-youtube {
  display: inline-flex;
  vertical-align: middle;
  color: var(--muted);
}

.site-footer nav .footer-youtube:hover { color: #ff0033; }

/* Responsiv */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .lead-story { grid-template-columns: 1fr; }
  .lead-story .visual { min-height: 200px; }
  .grid { grid-template-columns: 1fr; }
  /* Auf schmalen Bildschirmen ersetzt die Vorhersage das Datum */
  .topbar .weather:not(.wx-ready),
  .topbar:has(.wx-ready) #heute,
  .wx-place,
  .wx-name { display: none; }
  .topbar:has(.wx-ready) { justify-content: center; }
  .wx-short { display: inline; }
  .weather.wx-ready { gap: 12px; }
  .photo img { height: 220px; }
}

/* Terminseite */
.termine h1 { font-size: clamp(30px, 5vw, 40px); }
.termine .standfirst {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 720px;
}
.termine-list { max-width: 820px; }
.event-month {
  font-size: 26px;
  margin: 40px 0 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--text);
}
.event-day h2 { font-size: 22px; margin: 24px 0 0; }
.event-date {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 28px 0 4px;
}
.events { list-style: none; margin: 0; padding: 0; }
.event {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.event:target { background: var(--accent-soft); }
.event-time { font-weight: 700; font-size: 15px; }
.event h3 { font-size: 19px; margin: 0 0 4px; line-height: 1.3; }
.event h3 a { text-decoration: none; }
.event h3 a:hover { text-decoration: underline; }
.event p { margin: 0; font-size: 15px; color: var(--muted); }
.termine > .box-note { max-width: 820px; margin-top: 40px; }
@media (max-width: 600px) {
  .event { grid-template-columns: 1fr; gap: 2px; }
}

/* Videos von YouTube: erst nach Klick geladen (video.js) */
.video { margin: 8px 0 28px; }
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  background: #1f1c18;
  color: #f3efe8;
  border-radius: 6px;
  text-align: center;
}
.video-embed.is-loaded { padding: 0; }
.video-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; }
.video-load {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 600 16px/1 var(--sans);
  cursor: pointer;
}
.video-load:hover { filter: brightness(1.1); }
.video-load svg { width: 18px; height: 18px; fill: currentColor; }
.video-hint { margin: 0; max-width: 460px; font-size: 13px; color: #cfc8bc; }
.video-hint a { color: inherit; }
.video figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.video .credit { display: block; margin-top: 2px; font-size: 12px; }
.video .credit a { color: inherit; }
@media (max-width: 600px) {
  .video-embed { aspect-ratio: auto; min-height: 220px; }
  .video-embed.is-loaded { aspect-ratio: 16 / 9; min-height: 0; }
}

/* Fußball-Box in der Seitenleiste */
.match { margin: 0; }
.match a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: inherit; text-decoration: none; }
.match a:hover { color: var(--accent); }
.match-teams { font-weight: 600; font-size: 16px; }
.match-score { font-family: var(--serif); font-size: 24px; font-weight: 700; }
.match-meta { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.match-video { margin: 0; font-size: 15px; font-weight: 600; }
