/*
 * exploki.de – Seitenlayout. Farben, Schriften, Leiste, Fuß, Knöpfe kommen aus exploki-ui (/ui/*.css, npm run ui:sync);
 * hier nur Anordnung und seitenspezifische Bausteine, ausschließlich mit --xui-*-Variablen (hell und dunkel).
 */
html {
  scroll-behavior: smooth;
}
body {
  line-height: 1.6;
}
img {
  max-width: 100%;
  height: auto;
}
/* <picture> nur für die Dunkel-Logos: Anordnung bleibt am <img>; <source> ist in Chrome nicht display:none
   und würde sonst selbst Grid-/Flex-Element */
picture {
  display: contents;
}
picture > source {
  display: none;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.muted {
  color: var(--xui-muted);
}

/* ---------- Startseite ---------- */
.hero {
  padding: 48px 0 32px;
}
.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}
.hero h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  margin: 0 0 16px;
}
.lead {
  font-size: 1.15rem;
  margin: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-logo {
  justify-self: center;
  width: min(100%, 360px);
}

.section {
  padding: 40px 0;
}
.section--soft {
  background: var(--xui-card);
}
.section h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin: 0 0 8px;
}
.section-lead {
  margin: 0 0 24px;
  max-width: 70ch;
}
/* Tools direkt unter dem Hero, ohne eigene Überschrift – der Abstand des Hero reicht */
#tools {
  padding-top: 0;
}
.tools-note {
  margin: 18px 0 0;
  color: var(--xui-muted);
}

/* Sechs Tools: am Desktop 3 + 3, am Tablet 2 Spalten, am Handy eine (bei auto-fit stünde eins allein) */
.tool-cards,
.howto {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 40rem) {
  .tool-cards,
  .howto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* „So geht's“ hat fünf Anleitungen: am Desktop 3 + 2 */
@media (min-width: 60rem) {
  .tool-cards,
  .howto {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tool-card .card-logo {
  height: 64px;
  width: auto;
  align-self: flex-start;
}
.tool-card p {
  margin: 0;
  flex: 1;
}
.badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--xui-tool-text, var(--xui-text));
  box-shadow: inset 0 0 0 2px var(--xui-tool-text, var(--xui-line));
}
/* Knöpfe in der Karte: gleich breit, nebeneinander oder (schmale Karte) untereinander über die volle Breite */
.tool-card .actions .xui-btn {
  flex: 1 1 auto;
  justify-content: center;
}
.more {
  font-weight: 700;
}

.facts {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.facts li {
  background: var(--xui-page);
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 600;
}

.howto h3 {
  margin: 0 0 8px;
  color: var(--xui-tool-text);
}
.howto p {
  margin: 0;
}
/* Vorschauseite /rallye */
.preview-logo {
  display: block;
  width: min(100%, 260px);
  margin-bottom: 20px;
}
.hero .badge {
  display: inline-block;
  margin-bottom: 12px;
}
.steps {
  margin: 0;
  padding-left: 1.4em;
}
.steps li + li {
  margin-top: 6px;
}

.faq {
  display: grid;
  gap: 10px;
  max-width: 80ch;
}
.faq details {
  background: var(--xui-card);
  border-radius: 14px;
  padding: 12px 16px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
}
.faq p {
  margin: 8px 0 0;
}

/* ---------- Rechtsseiten und 404 ---------- */
.doc {
  max-width: 75ch;
  margin: 0 auto;
  padding: 32px 16px 48px;
  overflow-wrap: break-word;
}
.doc h1 {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
  margin-top: 0;
}
.doc h2 {
  font-size: 1.3rem;
  margin-top: 2em;
}
.doc h3 {
  font-size: 1.1rem;
  margin-top: 1.5em;
}
.doc address {
  font-style: normal;
}
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  background: var(--xui-card);
}
.table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
}
.table-wrap th,
.table-wrap td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--xui-line);
}

@media (max-width: 760px) {
  .hero {
    padding-top: 28px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Auf dem Handy kein großes Logo: die Leiste zeigt die Marke, die Tools rücken nach oben */
  .hero-grid picture {
    display: none;
  }
  .section {
    padding: 28px 0;
  }
}

/* ---------- Vorschau-Seiten /fluffy, /logsi, /sql (Spieler: vorschau.js, Markup: npm run vorschau:sync) ---------- */
.vorschau-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.vorschau-kopf {
  padding: 36px 0 20px;
}
.vorschau-logo {
  display: block;
  width: auto;
  height: 52px;
  margin-bottom: 14px;
}
.vorschau-kopf h1 {
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 10px;
}
.vorschau-kopf .lead {
  max-width: 60ch;
  color: var(--xui-muted);
}
.vorschau-plattform {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: var(--xui-muted);
}
.vorschau-kopf-actions {
  margin-top: 18px;
}
.vorschau-clip {
  padding-bottom: 32px;
}
.vorschau-merkmal {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--xui-tool-text, var(--xui-text));
  box-shadow: inset 0 0 0 2px var(--xui-tool-text, var(--xui-line));
}
.vorschau-spieler {
  background: var(--xui-card);
  border: 1px solid var(--xui-line);
  border-radius: 14px;
  overflow: hidden;
}
.clip-wahl-leiste {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--xui-line);
}
.clip-wahl {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 36px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--xui-text);
  box-shadow: inset 0 0 0 1.5px var(--xui-line);
  cursor: pointer;
}
.clip-wahl[aria-pressed="true"] {
  background: var(--xui-primary);
  color: var(--xui-primary-text);
  box-shadow: none;
}
video.clip {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: var(--xui-page);
}
video.clip[hidden] {
  display: none;
}
.clip-schritt {
  margin: 0;
  padding: 10px 14px;
  min-height: 3.2em;
  border-top: 1px solid var(--xui-line);
  font-weight: 600;
}
.clip-schritt:empty {
  display: none;
}
.vorschau-h3 {
  font-size: 1.1rem;
  margin: 24px 0 10px;
}
.themen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.thema {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 14px 4px 10px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-size: 0.95rem;
  background: var(--xui-card);
  color: var(--xui-text);
  box-shadow: inset 0 0 0 1.5px var(--xui-line);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.thema .haken {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--xui-muted);
}
.thema.gezeigt {
  background: var(--xui-ok-bg);
  color: var(--xui-ok);
  box-shadow: inset 0 0 0 1.5px var(--xui-ok);
}
.thema.gezeigt .haken {
  background: var(--xui-ok);
  box-shadow: none;
}
/* Haken als gedrehte Ecke, damit „gezeigt“ nicht nur an der Farbe hängt */
.thema.gezeigt .haken::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--xui-ok-bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.vorschau-hinweis {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--xui-muted);
}
.vorschau-actions {
  margin-top: 22px;
}
.vorschau-punkte {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.vorschau-punkte li {
  background: var(--xui-card);
  border-left: 4px solid var(--xui-tool-text, var(--xui-brand-cyan));
  border-radius: 12px;
  padding: 14px 16px;
}
.section--soft .vorschau-punkte li {
  background: var(--xui-page);
}
.vorschau-punkte h3 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.vorschau-punkte p {
  margin: 0;
}
.vorschau-ablauf h3 {
  font-size: 1.05rem;
  margin: 18px 0 6px;
}
.vorschau-ablauf .schritte {
  margin: 0;
  padding-left: 1.4em;
  max-width: 75ch;
}
/* /quiz: Zeilen im Kopf ohne Windows-Version (Spec exploki-quiz 2026-11-15-quiz-startseite-design.md) */
.vorschau-zeile {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: var(--xui-muted);
}
.vorschau-pin {
  margin-top: 14px;
}
@media (max-width: 599px) {
  video.clip {
    aspect-ratio: 4 / 5;
  }
  /* Clip schon im ersten Bild: Kopf auf dem Handy knapp halten */
  .vorschau-kopf {
    padding: 18px 0 14px;
  }
  .vorschau-logo {
    height: 36px;
    margin-bottom: 10px;
  }
  .vorschau-kopf h1 {
    font-size: 1.5rem;
  }
  .vorschau-kopf .lead {
    font-size: 1rem;
  }
  /* Auf dem Handy lädt niemand die Windows-Version; der Knopf unter dem Clip bleibt */
  .vorschau-plattform,
  .vorschau-kopf .vorschau-windows {
    display: none;
  }
  .vorschau-kopf-actions {
    margin-top: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .thema {
    transition: none;
  }
}

/* ---------- Materialseiten (public/material/*.html, material.js) ---------- */
.mat-tool {
  display: inline-block;
}
.mat-vorschau {
  padding-bottom: 32px;
}
.mat-wahl-leiste {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.mat-wahl {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 40px;
  padding: 4px 18px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--xui-text);
  box-shadow: inset 0 0 0 1.5px var(--xui-line);
  cursor: pointer;
}
.mat-wahl[aria-pressed="true"] {
  background: var(--xui-primary);
  color: var(--xui-primary-text);
  box-shadow: none;
}
.mat-seiten {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 300px);
  gap: 16px;
  margin: 0;
  padding: 4px 4px 10px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.mat-seiten[hidden] {
  display: none;
}
.mat-seiten li {
  scroll-snap-align: start;
}
@media (min-width: 761px) {
  .mat-seiten {
    grid-auto-flow: row;
    /* drei Spalten: 6 Seiten als 3 × 2 statt 5 + 1, die Seiten bleiben groß genug zum Lesen */
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }
}
.mat-seite {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--xui-line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 4px 14px rgb(20 33 61 / 12%);
}
.mat-seite img {
  display: block;
  width: 100%;
  height: auto;
}
.mat-seite:focus-visible {
  outline: 3px solid var(--xui-focus);
  outline-offset: 3px;
}
.mat-seitenzahl {
  margin: 6px 0 0;
  font-size: 0.9rem;
  text-align: center;
  color: var(--xui-muted);
}
.mat-hinweis-vorschau {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--xui-muted);
}
.mat-kasten {
  margin: 20px 0 0;
  padding: 14px 18px;
  border: 2px solid var(--xui-warn);
  border-radius: 12px;
  background: var(--xui-warn-bg);
  color: var(--xui-text);
  max-width: 75ch;
}
.mat-kasten p {
  margin: 0;
}
.mat-paket-zusatz {
  margin-top: 16px;
}
dialog.mat-gross {
  width: min(96vw, 1000px);
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--xui-card);
  color: var(--xui-text);
}
dialog.mat-gross::backdrop {
  background: rgb(10 17 32 / 70%);
}
.mat-gross-leiste {
  position: sticky;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--xui-card);
  border-bottom: 1px solid var(--xui-line);
}
.mat-gross-zahl {
  margin: 0 auto 0 0;
  font-weight: 700;
}
dialog.mat-gross img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}
.mat-hinweis {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: var(--xui-card);
  border: 1px solid var(--xui-line);
  color: var(--xui-text);
  text-decoration: none;
}
.section--soft .mat-hinweis {
  background: var(--xui-page);
}
.mat-hinweis img {
  width: 100%;
  height: auto;
  border: 1px solid var(--xui-line);
  border-radius: 4px;
  background: #fff;
}
.mat-hinweis-text {
  display: grid;
  gap: 4px;
}
.mat-hinweis-text strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mat-kasten-kurz {
  justify-self: start;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--xui-warn);
  background: var(--xui-warn-bg);
}
.mat-video {
  display: grid;
  gap: 10px;
  max-width: 560px;
  color: var(--xui-text);
  font-weight: 700;
}
.mat-video img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--xui-line);
}
.mat-karten {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.mat-karte {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: start;
  height: 100%;
  box-sizing: border-box;
  padding: 16px;
  border-radius: 14px;
  background: var(--xui-card);
  border: 1px solid var(--xui-line);
  color: var(--xui-text);
  text-decoration: none;
}
.mat-karte img {
  width: 100%;
  height: auto;
  border: 1px solid var(--xui-line);
  border-radius: 4px;
  background: #fff;
}
.mat-karte-text {
  display: grid;
  gap: 6px;
}
.mat-karte-text strong {
  font-size: 1.1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 480px) {
  .mat-karte,
  .mat-hinweis {
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding: 12px;
  }
}
.mat-quiz {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin-top: 16px;
  border-radius: 10px;
  border: 1px solid var(--xui-line);
}

/* /rallye: Bildschirmfotos vom Handy statt Clip (Frank 2026-11-19) */
.rallye-bilder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rallye-bilder figure {
  margin: 0;
}
.rallye-bilder img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--xui-line);
  border-radius: 18px;
}
.rallye-bilder figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--xui-muted);
}
@media (max-width: 799px) {
  .rallye-bilder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
