/* FastBrand — Oberfläche.
   Die Werte kommen aus neumann-carolin.com, damit das Werkzeug wie ein Teil
   der Seite wirkt und nicht wie ein fremdes Produkt in einem Rahmen. */

:root {
  --bg: #F5F4F0;
  --card: #FFFFFF;
  --ink: #1F1D3A;
  --muted: #5C5A78;
  --line: #E0DED4;
  --accent: #3A47C9;
  --accent-weich: #EDEEFB;
  /* Die drei Schriftstapel von neumann-carolin.com. Das Werkzeug ist eine
     Unterseite, keine eigene Marke — es benutzt die Schriften der Seite und
     nicht seine eigenen. Die Marken in der Vorschau bringen ihre eigenen
     mit; genau dieser Unterschied macht sichtbar, was erzeugt wurde und was
     Rahmen ist. */
  --schrift: "Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --anzeige: "Futura", "Avenir Next", "Century Gothic", "Trebuchet MS", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --xs: 6px; --sm: 10px; --md: 16px; --lg: 22px; --xl: 30px;
  --r-klein: 12px; --r-mittel: 18px; --r-karte: 24px; --r-gross: 32px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16151F; --card: #201F2C; --ink: #EDEBF2; --muted: #A6A3BC;
    --line: #34324A; --accent: #97A3FF; --accent-weich: #23223A;
  }
}

* { margin: 0; box-sizing: border-box; }

body {
  background: var(--bg); color: var(--ink); font-family: var(--schrift);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* --- Kopf ---------------------------------------------------------------- */

.kopf {
  display: flex; align-items: center; gap: var(--lg); flex-wrap: wrap;
  padding: var(--md) var(--xl); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px;
}
.kopf .marke { color: var(--muted); }
.kopf .marke a { color: var(--ink); text-decoration: none; font-weight: 600; }
.kopf .marke a:hover { color: var(--accent); }
.kopf nav { display: flex; gap: var(--md); }
.kopf nav a { color: var(--muted); text-decoration: none; }
.kopf nav a:hover { color: var(--accent); }
.fortschritt { flex: 1; height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; }
.balken { height: 100%; width: 0; background: var(--accent); transition: width 0.35s ease; }

/* --- Bühne --------------------------------------------------------------- */

.buehne {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: var(--xl); padding: var(--xl); max-width: 1240px; margin: 0 auto; width: 100%;
  align-items: start;
}
@media (max-width: 900px) {
  .buehne { grid-template-columns: 1fr; }
  .vorschau { order: -1; }
}

/* --- Die Frage ----------------------------------------------------------- */

.frage { padding-top: var(--lg); max-width: 620px; }
.frage h1 { font-family: var(--anzeige); font-size: 32px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.frage .hilfe { color: var(--muted); font-size: 16px; line-height: 1.55; margin-top: var(--sm); }
.frage .wofuer { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: var(--md); }

.feld {
  width: 100%; font: inherit; font-size: 22px; color: var(--ink);
  background: transparent; border: none; border-bottom: 2px solid var(--line);
  padding: var(--sm) 0; margin-top: var(--lg); outline: none;
}
.feld:focus { border-bottom-color: var(--accent); }
.feld::placeholder { color: var(--muted); opacity: 0.55; }

/* Schieberegler */
.paare { margin-top: var(--lg); display: grid; gap: var(--lg); }
.paar { display: grid; gap: var(--xs); }
.paar-zeile { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); }
.paar-zeile .aktiv { color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); height: 22px; }

/* Mehrfachauswahl */
.optionen { display: grid; gap: var(--sm); margin-top: var(--lg); }
.option {
  display: flex; gap: var(--md); align-items: flex-start; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-mittel);
  padding: var(--md); cursor: pointer; font: inherit; color: inherit; width: 100%;
}
.option:hover { border-color: var(--accent); }
.option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-weich); }
.option .haken {
  width: 20px; height: 20px; flex: none; border-radius: 6px; border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 12px; color: transparent; margin-top: 2px;
}
.option[aria-pressed="true"] .haken { background: var(--accent); border-color: var(--accent); color: #fff; }
.option b { display: block; font-family: var(--anzeige); font-size: 16px; font-weight: 600; }
.option span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* Auswahl mit Vorschau (Richtung, Zeichen, Farbe) */
.karten { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sm); margin-top: var(--lg); }
@media (max-width: 620px) { .karten { grid-template-columns: 1fr; } }
.wahl {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-mittel);
  padding: var(--sm); cursor: pointer; font: inherit; color: inherit; text-align: left;
  display: flex; flex-direction: column; gap: var(--sm);
}
.wahl:hover { border-color: var(--accent); }
.wahl[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.wahl .bild { border-radius: var(--r-klein); overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.wahl .bild svg, .wahl .bild img { display: block; max-width: 74%; max-height: 74%; }
.wahl b { font-family: var(--anzeige); font-size: 14px; font-weight: 600; padding: 0 var(--xs); }
.wahl span { font-size: 12px; color: var(--muted); padding: 0 var(--xs) var(--xs); line-height: 1.4; }

.farbwahl { display: flex; gap: var(--sm); align-items: center; margin-top: var(--md); flex-wrap: wrap; }
.farbwahl input[type=color] { width: 52px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-klein); background: none; cursor: pointer; padding: 2px; }
.farbwahl input[type=text] {
  font: inherit; font-size: 15px; font-family: ui-monospace, Menlo, monospace; width: 120px;
  padding: var(--sm); border: 1px solid var(--line); border-radius: var(--r-klein);
  background: var(--card); color: var(--ink);
}

/* Knöpfe */
.knoepfe { display: flex; gap: var(--sm); align-items: center; margin-top: var(--xl); flex-wrap: wrap; }
.knopf {
  font-family: var(--anzeige); font-size: 15px; font-weight: 500; padding: 12px var(--lg);
  border-radius: 999px; border: none; background: var(--accent); color: #fff; cursor: pointer;
}
.knopf:disabled { opacity: 0.4; cursor: not-allowed; }
.knopf.leise { background: transparent; color: var(--muted); }
.knopf.leise:hover { color: var(--accent); }
.beruhigung { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--muted); margin-top: var(--sm); }

/* --- Vorschau ------------------------------------------------------------ */

.vorschau { position: sticky; top: var(--md); }
.vorschau-innen {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-karte);
  padding: var(--lg); min-height: 260px; overflow: hidden;
}
.warten { color: var(--muted); font-size: 14px; line-height: 1.5; }
.vorschau-fuss { font-size: 12px; color: var(--muted); margin-top: var(--sm); line-height: 1.5; }

.v-logo { display: flex; align-items: center; justify-content: center; padding: var(--sm) 0 var(--lg); }
.v-logo svg { max-width: 82%; height: auto; max-height: 84px; }
.v-farben { display: flex; gap: 4px; }
.v-farben div { flex: 1; height: 42px; border-radius: 8px; }
.v-titel { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: var(--md) 0 var(--xs); font-weight: 600; }
.v-probe { border-radius: var(--r-mittel); padding: var(--md); border: 1px solid; }
.v-probe h3 { font-size: 17px; font-weight: 600; }
.v-probe p { font-size: 13px; line-height: 1.5; margin-top: 4px; }
.v-probe .knopf-probe { display: inline-block; font-size: 13px; font-weight: 500; padding: 8px 16px; margin-top: var(--md); }
.v-zeile { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: var(--xs); }
.v-zeile b { color: var(--ink); font-weight: 600; }

/* --- Ergebnis ------------------------------------------------------------ */

.ergebnis h1 { font-family: var(--anzeige); font-size: 32px; }
.liste { margin-top: var(--lg); display: grid; gap: var(--sm); }
.liste div { display: flex; gap: var(--sm); font-size: 15px; line-height: 1.5; }
.liste .zahl { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; min-width: 44px; }
.hinweiskasten {
  margin-top: var(--lg); padding: var(--md); border-radius: var(--r-mittel);
  background: var(--accent-weich); font-size: 14px; line-height: 1.55;
}

.fuss { padding: var(--md) var(--xl) var(--xl); color: var(--muted); font-size: 12px; text-align: center; }

/* --- Der letzte Schritt: das fertige Kit --------------------------------- */
/* Hier ist die Marke der Inhalt, nicht mehr die Frage. Die schmale Vorschau
   daneben wäre jetzt eine Verkleinerung dessen, was ohnehin groß dasteht. */

body.fertig .buehne { grid-template-columns: 1fr; max-width: 1080px; }
body.fertig .vorschau { display: none; }

.kopfzeile {
  border: 1px solid; border-radius: var(--r-karte); padding: var(--xl);
  display: flex; flex-direction: column; align-items: center; gap: var(--md);
  margin-bottom: var(--xl); text-align: center;
}
.kopfzeile .grosslogo { width: min(420px, 80%); }
.kopfzeile .grosslogo svg { width: 100%; height: auto; display: block; }
.kopfzeile p { font-size: 15px; }

.abschnitt-titel {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: var(--xl) 0 var(--sm);
  padding-bottom: var(--xs); border-bottom: 1px solid var(--line);
}

.anwendungen-raster { display: flex; flex-wrap: wrap; gap: var(--md); margin-top: var(--md); align-items: flex-start; }
.anwendung-kachel { margin: 0; }
/* Bewusst NICHT „buehne": Die Hauptbühne heißt schon so, und ein zweites
   Element mit demselben Namen erbt deren Grid-Layout samt Innenabstand.
   Genau das ist passiert — die Anwendungen saßen versetzt und abgeschnitten
   in ihren Kacheln, und im Kachel-Code war nichts zu sehen. */
.anwendung-kachel .schaukasten {
  overflow: hidden; border-radius: var(--r-mittel); border: 1px solid var(--line);
  background: var(--card); position: relative;
}
/* Der Inhalt wird in echter Größe gebaut und dann verkleinert — so stimmen
   alle Innenmaße, statt dass jedes Element für die Vorschau neu gerechnet
   werden müsste. */
.anwendung-kachel .inhalt { transform-origin: 0 0; }
/* Im Ergebnis trägt der Inhalt die volle Breite — die 620-Pixel-Spalte
   gehört zur Frage, nicht zur fertigen Marke. */
body.fertig .frage { max-width: none; }
.anwendung-kachel figcaption { font-size: 12px; color: var(--muted); margin-top: var(--xs); }

.wertreihe { display: flex; flex-wrap: wrap; gap: var(--sm); margin-top: var(--md); }
.wert {
  display: flex; align-items: center; gap: var(--sm); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 13px;
}
.wert .klecks { width: 26px; height: 26px; border-radius: 999px; border: 1px solid; display: block; }
.wert b { font-weight: 600; }
.wert code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); }

/* Sprachumschalter — zwei Kürzel, kein Klappmenü. Bei zwei Sprachen ist
   ein Menü ein Klick zu viel. */
.sprache { display: flex; gap: 2px; }
.sprache button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  padding: 4px 9px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; border-radius: 999px;
}
.sprache button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.sprache button:hover { color: var(--ink); }

.rechtliches { margin-top: var(--sm); font-family: var(--mono); font-size: 11px; }
.rechtliches a { color: var(--muted); text-decoration: none; }
.rechtliches a:hover { color: var(--accent); }
