/* ---------- Farben & Grundwerte ---------- */
:root {
  --bg: #F3F7FF;
  --surface: #FFFFFF;
  --ink: #1E2A5A;
  --ink-soft: #4A5585;
  --line: #CBD5F0;
  --coral: #FF7A6B;
  --sun: #FFC93C;
  --mint: #2EC4A6;
  --grape: #7B61FF;
  --on-color: #1E2A5A;
  --btn-bg: #1E2A5A;
  --btn-ink: #FFFFFF;
  --focus: #7B61FF;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141A33;
    --surface: #1D2547;
    --ink: #EEF1FF;
    --ink-soft: #B4BCE0;
    --line: #33406E;
    --btn-bg: #FFC93C;
    --btn-ink: #1E2A5A;
    --focus: #FFC93C;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Kopfbereich ---------- */
.site-header { padding-block: 1.25rem; }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  text-decoration: none; font-weight: 800; font-size: 1.35rem;
}
.brand-mark { width: 40px; height: 40px; }
.main-nav ul {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  list-style: none; margin: 0; padding: 0;
}
.main-nav a {
  text-decoration: none; font-weight: 700; color: var(--ink-soft);
  padding: .25rem 0; border-bottom: 3px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sun); }

/* Unsichtbar vergrößerte Tippfläche (mind. 44 × 44 px), ohne die Optik zu ändern */
.brand, .main-nav a, .site-footer a { position: relative; }
.brand::after, .main-nav a::after, .site-footer a::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: max(100%, 44px); height: max(100%, 44px);
  transform: translate(-50%, -50%);
}

/* ---------- Begrüßung mit Kreuzwort-Gitter ---------- */
.hero { padding-block: 2.5rem 3.5rem; }
.hero .wrap {
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.05fr 1fr; }
}
.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.9rem);
  line-height: 1.05; font-weight: 900; letter-spacing: -.02em;
  margin: 0 0 1rem;
}
.hero p {
  font-size: 1.2rem; color: var(--ink-soft);
  max-width: 34ch; margin: 0 0 1.75rem;
}
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 800;
  padding: .85rem 1.4rem; border-radius: 999px; border: 3px solid var(--btn-bg);
}
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-secondary { background: transparent; color: var(--ink); }

.crossword {
  --cell: clamp(38px, 7.2vw, 62px);
  display: grid;
  grid-template-columns: repeat(7, var(--cell));
  grid-template-rows: repeat(6, var(--cell));
  gap: 6px;
  justify-content: center;
}
.tile {
  grid-column: var(--c); grid-row: var(--r);
  position: relative;
  display: grid; place-items: center;
  border-radius: 12px;
  font-weight: 900; font-size: calc(var(--cell) * .5);
  color: var(--on-color);
  box-shadow: 0 4px 0 rgba(30, 42, 90, .18);
  animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: calc(var(--i) * 60ms);
}
.tile small {
  position: absolute; top: 3px; left: 6px;
  font-size: calc(var(--cell) * .2); font-weight: 800; opacity: .75;
}
.t-sun   { background: var(--sun); }
.t-coral { background: var(--coral); }
.t-mint  { background: var(--mint); }
.t-grape { background: var(--grape); color: #FFFFFF; }
@keyframes pop {
  from { transform: scale(.3) rotate(-12deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ---------- Rätselarten ---------- */
.section { padding-block: 2.5rem; }
.section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 900;
  margin: 0 0 1.75rem; letter-spacing: -.01em;
}
.kinds {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.kind a {
  display: flex; flex-direction: column; gap: .6rem; height: 100%;
  padding: 1.6rem 1.5rem 1.5rem;
  border-radius: 22px 22px 22px 6px;
  text-decoration: none; color: var(--on-color);
}
.kind:nth-child(1) a { background: var(--coral); transform: rotate(-1.2deg); }
.kind:nth-child(2) a { background: var(--sun);   transform: rotate(.8deg); }
.kind:nth-child(3) a { background: var(--mint);  transform: rotate(-.6deg); }
.kind svg { width: 64px; height: 64px; }
.kind h3 { font-size: 1.45rem; font-weight: 900; margin: .25rem 0 0; }
.kind p { margin: 0; font-size: 1.05rem; }
.badge {
  align-self: flex-start; margin-top: auto;
  background: rgba(255, 255, 255, .7); color: #1E2A5A;
  font-size: .85rem; font-weight: 800;
  padding: .2rem .7rem; border-radius: 999px;
}

/* ---------- Werbeplatz (Platzhalter) ----------
   Fest reservierte Größe: 320 × 100 am Handy, 728 × 90 ab 860 px.
   Mindestens 2 rem Abstand zu Knöpfen und Links, keine Akzentfarbe, keine Knopfform. */
.ad-slot {
  width: min(100%, 320px); height: 100px; margin: 2rem auto;
  display: grid; place-items: center;
  border: 2px dashed var(--line); border-radius: 12px;
  color: var(--ink-soft); font-size: .85rem;
}
@media (min-width: 860px) {
  .ad-slot { width: min(100%, 728px); height: 90px; }
}
/* Mitlaufende Seitenleiste der Download-Seiten (300 × 600): erst ab 1100 px,
   damit daneben noch ein Banner mit voller Breite von 728 px Platz hat.
   Darunter entfällt sie ganz (kein reservierter Platz am Handy). */
.ad-slot-seite { display: none; }
@media (min-width: 1100px) {
  .download-layout {
    width: min(1120px, 100% - 2.5rem); margin-inline: auto;
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 2rem; align-items: start;
  }
  /* Innerhalb der Spalte füllt jeder Bereich die Spaltenbreite */
  .download-inhalt .wrap { width: 100%; }
  .ad-slot.ad-slot-seite {
    display: grid; width: 300px; height: 600px; margin: 2.5rem 0 0;
    position: sticky; top: 1rem;
  }
}

/* ---------- Gut zu wissen ---------- */
.facts {
  display: grid; gap: 1.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 0;
}
.facts dt { font-weight: 900; font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; }
.facts dt::before {
  content: ""; width: 14px; height: 14px; border-radius: 4px; flex: none;
  background: var(--dot);
}
.facts dd { margin: .3rem 0 0; color: var(--ink-soft); max-width: 36ch; }

/* ---------- Fußbereich ---------- */
.site-footer {
  margin-top: 2.5rem; padding-block: 2rem;
  border-top: 2px solid var(--line); color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { font-weight: 700; }
.footer-note { flex-basis: 100%; margin: 0; font-size: .9rem; }

/* ---------- Unterseiten ---------- */
.page-head { padding-block: 2.5rem 1rem; }
.page-head h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1; font-weight: 900; letter-spacing: -.02em;
  margin: 1.25rem 0 .75rem;
}
.page-head .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; margin: 0; }
.tile-word {
  --cell: clamp(34px, 8vw, 48px);
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tile-word .tile { width: var(--cell); height: var(--cell); }

.prose { max-width: 70ch; }
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 900;
  margin: 2rem 0 .75rem; letter-spacing: -.01em;
}
.prose p, .prose ul { margin: 0 0 1rem; }
.prose li + li { margin-top: .35rem; }

.notice {
  max-width: 70ch; padding: 1.5rem;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: 22px 22px 22px 6px;
}
.notice .badge { display: inline-block; background: var(--sun); margin-bottom: .75rem; }
.notice p { margin: 0 0 1rem; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Download-Seiten ---------- */
.intro { max-width: 70ch; margin-top: 1.25rem; }
.intro p { margin: 0 0 .75rem; }
/* Sprunglinks zu den Stufen: ruhige Flächen, keine Knopfform wie „PDF herunterladen“ */
.stufen-nav-titel { margin: 1.5rem 0 .6rem; font-weight: 800; }
.stufen-nav ul {
  display: flex; flex-wrap: wrap; gap: .6rem;
  list-style: none; margin: 0; padding: 0;
}
.stufen-nav a {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; min-width: 44px; padding: .45rem .95rem;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); border-radius: 14px 14px 14px 4px;
  font-weight: 800; text-decoration: none;
}
.stufen-nav a:hover { border-color: var(--ink-soft); }
.stufen-nav small, .stufen-nav .bald small { font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.stufen-nav .marke { flex: none; width: .9rem; height: .9rem; border-radius: 4px; }
.stufen-nav .marke-schwer { background: var(--ink); }
.section[id] { scroll-margin-top: 1rem; }
.section .stufe-info { margin: -1rem 0 1.5rem; color: var(--ink-soft); max-width: 70ch; }
/* Noch fehlende Stufe: leise Markierung ohne Link */
.stufen-nav .bald {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .45rem .95rem;
  border: 2px dashed var(--line); border-radius: 14px 14px 14px 4px;
  font-weight: 800; color: var(--ink-soft);
}

/* Download-Kacheln: am Handy untereinander, breiter dann nebeneinander */
.downloads {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  list-style: none; margin: 0; padding: 0;
}
.download {
  display: flex; flex-direction: column; gap: .4rem;
  padding: 1rem 1rem 1.25rem;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: 22px 22px 22px 6px;
}
/* Vorschaubild immer auf heller Fläche, auch im Dunkelmodus */
.download img {
  width: 100%; height: auto; aspect-ratio: 1;
  background: #FFFFFF; border-radius: 12px;
  margin-bottom: .5rem;
}
.download h3 { font-size: 1.25rem; font-weight: 900; margin: 0; }
.download-stufe { margin: 0 0 .75rem; color: var(--ink-soft); font-weight: 700; }
.download-btn {
  margin-top: auto; text-align: center;
  min-height: 44px; padding-block: .7rem;
}
.downloads-leer { color: var(--ink-soft); }
/* Abzeichen „Neu“: als Text lesbar, feste Farben (Kontrast 9 : 1) in Hell und Dunkel */
.abzeichen-neu {
  display: inline-block; vertical-align: .15em; margin-left: .4rem;
  padding: .1rem .55rem; border-radius: 999px;
  background: var(--sun); color: var(--on-color);
  font-size: .8rem; font-weight: 800; letter-spacing: .02em;
}

/* Markierung für Rechtstexte, die Adrian noch einsetzt */
.legal-todo {
  display: block; margin: 0 0 1rem; padding: .75rem 1rem;
  border: 2px dashed var(--ink-soft); border-radius: 12px;
  color: var(--ink); font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; }
}
