/* Startseite: schlicht, hell und dunkel nach Systemeinstellung, keine fremden Schriften. */

:root {
  --page: #f6f5f1;
  --card: #ffffff;
  --ink: #1d2126;
  --muted: #5b636d;
  --line: #dedbd3;
  --accent: #1f5fbf;
  --online: #1c7c44;
  --paused: #9a5b00;
  --offline: #a3352b;
  --quiet: #6b7280;
  --shadow: 0 1px 2px rgb(20 24 30 / 6%), 0 6px 18px rgb(20 24 30 / 6%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #14171b;
    --card: #1d2227;
    --ink: #eceef1;
    --muted: #a3acb8;
    --line: #2e353d;
    --accent: #8ab4ff;
    --online: #5fd08a;
    --paused: #f0b24a;
    --offline: #f08a80;
    --quiet: #98a1ad;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.top,
.tiles,
.bottom,
.text-page {
  width: min(100% - 2rem, 68rem);
  margin-inline: auto;
}

.top {
  padding-block: 3rem 1.5rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.top p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
}

.top .note {
  margin-top: 1rem;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
  padding-block: 1rem 3rem;
}

.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: var(--shadow);
}

.tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.1rem 1.1rem;
}

.tile h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.tile-text {
  flex: 1;
  margin: 0;
  color: var(--muted);
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--quiet);
}

.dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: currentColor;
}

.status[data-kind="online"] {
  color: var(--online);
}

.status[data-kind="paused"] {
  color: var(--paused);
}

.status[data-kind="offline"] {
  color: var(--offline);
}

/* „folgt" und „unbekannt": nur ein Ring, damit der Unterschied nicht allein an der Farbe hängt. */
.status[data-kind="soon"] .dot,
.status[data-kind="unknown"] .dot {
  background: none;
  border: 2px solid currentColor;
}

.open {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 0.55rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.open:hover {
  background: var(--accent);
  color: var(--card);
}

.open[hidden] {
  display: none;
}

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

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.3rem;
}

.bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.text-page {
  max-width: 44rem;
  padding-block: 2.5rem;
}

.text-page h2 {
  margin-top: 2rem;
  font-size: 1.2rem;
}

.draft {
  padding: 0.8rem 1rem;
  border: 2px dashed var(--offline);
  border-radius: 0.6rem;
  color: var(--offline);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .open {
    transition: background-color 0.15s, color 0.15s;
  }
}
