/* ===========================================================================
   Creator-Radar — Oberfläche
   Stil wie das Freigabecenter: heller Grund, weiße Flächen, keine Schatten,
   alles mit 1-px-Linien getrennt. Schriftgewicht 500 ist hier „fett".
   Dazu ein Dunkelmodus, weil die Liste abends auf dem Sofa benutzt wird.
   =========================================================================== */

:root {
  --bg: #F1F2F4;
  --surface: #FFFFFF;
  --surface-2: #F7F8F9;
  --line: #E3E6EA;
  --line-2: #CED3DA;
  --ink: #14161A;
  --ink-2: #454B55;
  --ink-3: #798089;
  --ink-4: #A6ABB3;
  --kobalt: #2743C6;
  --kobalt-soft: #ECEFFC;
  --kobalt-ink: #FFFFFF;

  /* Fünf Stufen der Vorauswahl — siehe bewertung.js */
  --ok: #1B7F4B;        --ok-soft: #E6F4EC;
  --neutral: #4A5261;   --neutral-soft: #EEF0F3;
  --info: #2743C6;      --info-soft: #ECEFFC;
  --warn: #9A6400;      --warn-soft: #FBF1DE;
  --rot: #A81F2D;       --rot-soft: #FBEAEC;
  --grau: #798089;      --grau-soft: #F0F1F3;

  --r: 10px;
  --r-sm: 7px;
  --r-lg: 14px;
  --tippziel: 44px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-hell]) {
    --bg: #0E1013;
    --surface: #171A1F;
    --surface-2: #1E2228;
    --line: #262B33;
    --line-2: #333A44;
    --ink: #EDEFF2;
    --ink-2: #B7BDC6;
    --ink-3: #868D98;
    --ink-4: #5C636D;
    --kobalt: #7B92F0;
    --kobalt-soft: #1B2341;
    --kobalt-ink: #0E1013;
    --ok: #4FBF85;       --ok-soft: #10281C;
    --neutral: #A3ABB8;  --neutral-soft: #20242B;
    --info: #7B92F0;     --info-soft: #1B2341;
    --warn: #E0A93C;     --warn-soft: #2C2312;
    --rot: #F0737F;      --rot-soft: #2E1519;
    --grau: #868D98;     --grau-soft: #1E2228;
  }
}
:root[data-dunkel] {
  --bg: #0E1013; --surface: #171A1F; --surface-2: #1E2228;
  --line: #262B33; --line-2: #333A44;
  --ink: #EDEFF2; --ink-2: #B7BDC6; --ink-3: #868D98; --ink-4: #5C636D;
  --kobalt: #7B92F0; --kobalt-soft: #1B2341; --kobalt-ink: #0E1013;
  --ok: #4FBF85; --ok-soft: #10281C; --neutral: #A3ABB8; --neutral-soft: #20242B;
  --info: #7B92F0; --info-soft: #1B2341; --warn: #E0A93C; --warn-soft: #2C2312;
  --rot: #F0737F; --rot-soft: #2E1519; --grau: #868D98; --grau-soft: #1E2228;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--kobalt); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 21px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
small { font-size: 12.5px; color: var(--ink-3); }
:focus-visible { outline: 2px solid var(--kobalt); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------------ Gerüst */
.kopf {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.kopf__innen {
  max-width: 1180px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 14px; min-height: 54px; flex-wrap: wrap;
}
.marke { font-weight: 500; font-size: 15px; color: var(--ink); white-space: nowrap; }
.marke span { color: var(--ink-4); font-weight: 400; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 7px 11px; border-radius: var(--r-sm); color: var(--ink-2);
  font-size: 14px; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a[aria-current] { background: var(--kobalt-soft); color: var(--kobalt); font-weight: 500; }

.huelle { max-width: 1180px; margin: 0 auto; padding: 18px 16px 72px; }
.zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zeile--spreizen { justify-content: space-between; }
.stapel > * + * { margin-top: 14px; }

/* ------------------------------------------------------------------ Flächen */
.karte {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px;
}
.karte--eng { padding: 12px 14px; }
.karte__kopf { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }

/* ------------------------------------------------------------------ Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; cursor: pointer; text-decoration: none;
  white-space: nowrap; user-select: none;
}
.knopf:hover { background: var(--surface-2); text-decoration: none; }
.knopf:active { transform: translateY(1px); }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }
.knopf--voll { background: var(--kobalt); border-color: var(--kobalt); color: var(--kobalt-ink); font-weight: 500; }
.knopf--voll:hover { background: var(--kobalt); filter: brightness(1.08); }
.knopf--gross { min-height: var(--tippziel); padding: 0 18px; font-size: 15px; }
.knopf--breit { width: 100%; }
.knopf--still { border-color: transparent; background: transparent; color: var(--ink-2); }
.knopf--still:hover { background: var(--surface-2); }
.knopf--gefahr { color: var(--rot); border-color: var(--line-2); }

/* ------------------------------------------------------------------ Felder */
label.feld { display: block; margin-bottom: 12px; }
label.feld > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
label.feld > small { display: block; margin-top: 4px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=url],
input[type=date], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 11px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea.gross { min-height: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; }
input:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-3); }

/* ------------------------------------------------------------------ Merkmale */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--neutral-soft); color: var(--neutral); white-space: nowrap;
}
.chip[data-stufe=ok]      { background: var(--ok-soft);      color: var(--ok); }
.chip[data-stufe=neutral] { background: var(--neutral-soft); color: var(--neutral); }
.chip[data-stufe=info]    { background: var(--info-soft);    color: var(--info); }
.chip[data-stufe=warn]    { background: var(--warn-soft);    color: var(--warn); }
.chip[data-stufe=rot]     { background: var(--rot-soft);     color: var(--rot); }
.chip[data-stufe=grau]    { background: var(--grau-soft);    color: var(--grau); }

.hinweis {
  border: 1px solid var(--line); border-left: 3px solid var(--ink-4);
  background: var(--surface-2); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 13.5px; color: var(--ink-2);
}
.hinweis[data-stufe=warn] { border-left-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.hinweis[data-stufe=rot]  { border-left-color: var(--rot);  background: var(--rot-soft);  color: var(--rot); }
.hinweis[data-stufe=ok]   { border-left-color: var(--ok);   background: var(--ok-soft);   color: var(--ok); }
.hinweis[data-stufe=info] { border-left-color: var(--info); background: var(--info-soft); color: var(--info); }

/* --------------------------------------------------------- Kandidatenkarte
   Instagram und TikTok werden an der Farbschiene links unterschieden, nicht
   nur an einem Wort. Die Verläufe sind die Hausfarben der beiden Dienste;
   die echten Logos liegen als Datei im Ordner public/marken und werden nur
   eingeblendet, wenn sie da sind. */
.liste { display: grid; gap: 12px; }
.k {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 14px 14px 22px;
}
.k::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--pf, var(--line-2));
}
.k[data-pf=ig] { --pf: linear-gradient(180deg, #F9CE34, #EE2A7B 55%, #6228D7); }
.k[data-pf=tt] { --pf: linear-gradient(180deg, #25F4EE, #000 50%, #FE2C55); }
.k__kopf { display: flex; gap: 12px; align-items: flex-start; }
.k__bild {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--surface-2); border: 1px solid var(--line); object-fit: cover;
}
/* Kein Bild vorhanden: der Anfangsbuchstabe statt eines leeren Kreises.
 * Betrifft vor allem TikTok, wo es ueber die offizielle Schnittstelle kein
 * Profilbild gibt. */
.k__bild--leer {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 17px; color: var(--ink-3); line-height: 1;
  letter-spacing: .01em; user-select: none;
}
[data-pf=tt] .k__bild--leer { color: var(--ink-2); }

.k__haupt { min-width: 0; flex: 1; }
.k__name { font-weight: 500; font-size: 15px; display: block; word-break: break-word; }
.k__handle {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; color: var(--ink-3); word-break: break-all;
}
.k__pf { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; white-space: nowrap; }
.k__handle { flex-wrap: wrap; }
.k[data-pf=ig] .k__pf { color: #C13584; }
.k[data-pf=tt] .k__pf { color: var(--ink-2); }
@media (prefers-color-scheme: dark) { :root:not([data-hell]) .k[data-pf=ig] .k__pf { color: #F183C4; } }
:root[data-dunkel] .k[data-pf=ig] .k__pf { color: #F183C4; }

.k__zahlen { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.k__zahlen b { font-weight: 500; color: var(--ink); }
.k__zahlen span { white-space: nowrap; }
.k__warnung { margin-top: 8px; font-size: 13px; }
.k__aktionen { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.k__aktionen .knopf { min-height: var(--tippziel); }

/* ------------------------------------------------------- Beleg unter Text */
.beleg {
  border-left: 3px solid var(--line-2); background: var(--surface-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 8px 11px; font-size: 12.5px; color: var(--ink-3); margin-top: 6px;
}
.beleg b { color: var(--ink-2); font-weight: 500; }
.beleg q { color: var(--ink-2); font-style: normal; }

/* ------------------------------------------------------------------ Tabelle */
.tabellenhuelle { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; color: var(--ink-2); font-size: 13px; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
td.zahl, th.zahl { text-align: right; }

/* ------------------------------------------------------------------ Raster */
.raster { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.kennzahl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; }
.kennzahl em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.kennzahl b { display: block; font-size: 22px; font-weight: 500; margin-top: 2px; letter-spacing: -.02em; }

/* ------------------------------------------------------------------ Meldung */
.meldung { margin-bottom: 14px; }

/* ---------------------------------------------------------------- Fußleiste
   Auf dem Handy klebt die wichtigste Handlung unten am Daumen. */
.fussleiste {
  position: sticky; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 8px;
}
.fussleiste .knopf { flex: 1; min-height: var(--tippziel); }

/* Damit auf einen Blick klar ist, welcher Stand gerade laeuft. Steht
 * bewusst unten und leise, aber auf jeder Seite. */
.fassung {
  text-align: center; font-size: 12px; color: var(--ink-3);
  padding: 4px 16px 18px; opacity: .75; user-select: text;
}

.anmeldung { max-width: 380px; margin: 8vh auto; padding: 0 16px; }

/* ------------------------------------------------------------------ Schmal */
@media (max-width: 860px) {
  .huelle { padding: 14px 12px 72px; }
  .kopf__innen { padding: 0 12px; gap: 8px; flex-wrap: nowrap; min-height: 50px; }
  .marke span { display: none; }
  h1 { font-size: 19px; }
}
@media (max-width: 620px) {
  /* Am Handy zählt die Navigation, nicht die Marke. */
  .marke { font-size: 0; }
  .marke::before { content: "◎"; font-size: 19px; color: var(--kobalt); }
  .kopf__innen .knopf { padding: 0 9px; min-height: 34px; }
  .kopf__innen form .knopf { font-size: 0; }
  .kopf__innen form .knopf::before { content: "⎋"; font-size: 15px; }
}
@media (max-width: 560px) {
  .k { padding-left: 18px; }
  .k__aktionen .knopf { flex: 1 1 calc(50% - 4px); }
  .k__zahlen { gap: 10px; font-size: 12.5px; }
  .raster { grid-template-columns: 1fr 1fr; }
  .kennzahl b { font-size: 19px; }
}
@media (max-width: 400px) {
  .raster { grid-template-columns: 1fr; }
  .k__bild { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
