/* MCB Proxy – Farben aus MCB Aurora (MCB-CAD, docs/design/neu/farbschemata.json). Alle Werte als Tokens auf :root. */

@font-face {
  font-family: "Google Sans Flex";
  src: url("/fonts/GoogleSansFlex.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "MCB Sans";
  src: url("/fonts/MCBSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --schrift: "Google Sans Flex", system-ui, sans-serif;
  --marke: "MCB Sans", "Google Sans Flex", system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", monospace;

  --fenster: #ccd1d9;
  --grund: #e5eaf2;
  --kachel: #fcfeff;
  --flaeche-2: #eff4fa;
  --flaeche-3: #e3e8f0;
  --linie: #dbe0e8;
  --linie-stark: #c9ced6;
  --text: #11161e;
  --text-2: #4c535d;
  --text-3: #7b8189;
  --akzent: #2f6bf0;
  --akzent-hover: #2455c1;
  --akzent-weich: rgb(47 107 240 / 0.12);
  --auf-akzent: #ffffff;
  --neben1: #22c7d8;
  --neben1-text: #117a85;
  --neben1-weich: rgb(34 199 216 / 0.14);
  --neben2: #3b82f6;
  --neben2-text: #22519e;
  --neben2-weich: rgb(59 130 246 / 0.13);
  --neben3: #8b5cf6;
  --neben3-text: #57389e;
  --neben3-weich: rgb(139 92 246 / 0.13);
  --verlauf: linear-gradient(90deg, #22e3f2, #3b82f6, #8b5cf6);
  --ok: #11a158;
  --ok-weich: rgb(17 161 88 / 0.14);
  --warnung: #d98306;
  --warnung-weich: rgb(217 131 6 / 0.15);
  --fehler: #e5484d;
  --fehler-weich: rgb(229 72 77 / 0.13);
  --schwebend: rgb(252 254 255 / 0.9);
  --schatten: 0 1px 2px rgb(19 22 28 / 0.08), 0 4px 16px rgb(19 22 28 / 0.06);
  --radius: 14px;
  --radius-klein: 9px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fenster: #020308;
    --grund: #060a12;
    --kachel: #141a22;
    --flaeche-2: #1c222b;
    --flaeche-3: #252c35;
    --linie: #232932;
    --linie-stark: #2f363f;
    --text: #e7ebf2;
    --text-2: #abb2ba;
    --text-3: #6e757f;
    --akzent: #5b8dff;
    --akzent-hover: #739fff;
    --akzent-weich: rgb(91 141 255 / 0.18);
    --auf-akzent: #0b1020;
    --neben1-text: #7fd9e4;
    --neben2-text: #77aafc;
    --neben3-text: #aa91fd;
    --neben1-weich: rgb(34 199 216 / 0.14);
    --ok: #3fcf86;
    --ok-weich: rgb(63 207 134 / 0.16);
    --warnung: #f2a93b;
    --warnung-weich: rgb(242 169 59 / 0.16);
    --fehler: #ff6b6f;
    --fehler-weich: rgb(255 107 111 / 0.16);
    --schwebend: rgb(23 29 38 / 0.92);
    --schatten: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px rgb(0 0 0 / 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --fenster: #020308;
  --grund: #060a12;
  --kachel: #141a22;
  --flaeche-2: #1c222b;
  --flaeche-3: #252c35;
  --linie: #232932;
  --linie-stark: #2f363f;
  --text: #e7ebf2;
  --text-2: #abb2ba;
  --text-3: #6e757f;
  --akzent: #5b8dff;
  --akzent-hover: #739fff;
  --akzent-weich: rgb(91 141 255 / 0.18);
  --auf-akzent: #0b1020;
  --neben1-text: #7fd9e4;
  --neben2-text: #77aafc;
  --neben3-text: #aa91fd;
  --ok: #3fcf86;
  --ok-weich: rgb(63 207 134 / 0.16);
  --warnung: #f2a93b;
  --warnung-weich: rgb(242 169 59 / 0.16);
  --fehler: #ff6b6f;
  --fehler-weich: rgb(255 107 111 / 0.16);
  --schwebend: rgb(23 29 38 / 0.92);
  --schatten: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px rgb(0 0 0 / 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.5;
  background: var(--grund);
  color: var(--text);
}
a { color: var(--akzent); text-decoration: none; }
a:hover { color: var(--akzent-hover); text-decoration: underline; }
h1, h2, h3 { font-family: var(--marke); font-weight: 700; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }

/* Kopfleiste */
.kopf {
  background: var(--kachel);
  border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; z-index: 5;
}
.kopf::after { content: ""; display: block; height: 3px; background: var(--verlauf); }
.kopf-innen {
  max-width: 1180px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.wortmarke { font-family: var(--marke); font-size: 20px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.wortmarke:hover { text-decoration: none; color: var(--text); }
.wortmarke .zeichen {
  width: 28px; height: 28px; border-radius: 8px; background: var(--verlauf);
  display: inline-block; position: relative;
}
.wortmarke .zeichen::after { content: ""; position: absolute; inset: 7px; border-radius: 3px; background: var(--kachel); opacity: 0.92; }
nav.haupt { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav.haupt a {
  color: var(--text-2); padding: 7px 12px; border-radius: var(--radius-klein); font-weight: 500;
}
nav.haupt a:hover { background: var(--flaeche-2); text-decoration: none; color: var(--text); }
nav.haupt a.aktiv { background: var(--akzent-weich); color: var(--akzent); }
.rechts { display: flex; gap: 8px; align-items: center; color: var(--text-2); }

main { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }
.titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.leise { color: var(--text-2); }
.sehr-leise { color: var(--text-3); }

/* Karten und Flächen */
.karte {
  background: var(--kachel); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 18px;
}
.karte + .karte { margin-top: 16px; }
.schmal { max-width: 440px; margin: 40px auto; }

/* Knöpfe */
.knopf, button {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--linie-stark); background: var(--flaeche-2); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius-klein); line-height: 1.2;
  display: inline-flex; align-items: center; gap: 6px;
}
.knopf:hover, button:hover { background: var(--flaeche-3); text-decoration: none; color: var(--text); }
.knopf.haupt, button.haupt { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); }
.knopf.haupt:hover, button.haupt:hover { background: var(--akzent-hover); color: var(--auf-akzent); }
.knopf.gefahr, button.gefahr { color: var(--fehler); border-color: var(--fehler); background: transparent; }
.knopf.gefahr:hover, button.gefahr:hover { background: var(--fehler-weich); color: var(--fehler); }
.knopf.klein, button.klein { padding: 5px 10px; font-size: 13px; }
button:focus-visible, .knopf:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--akzent); outline-offset: 2px;
}
.zeile { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; margin: 0; }

/* Marken */
.marke {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--flaeche-3); color: var(--text-2);
}
.marke.ok { background: var(--ok-weich); color: var(--ok); }
.marke.warn { background: var(--warnung-weich); color: var(--warnung); }
.marke.fehler { background: var(--fehler-weich); color: var(--fehler); }
.marke.neu { background: var(--neben1-weich); color: var(--neben1-text); }
.marke.geaendert { background: var(--neben3-weich); color: var(--neben3-text); }
.marke.aus { background: var(--flaeche-3); color: var(--text-3); }
.punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--text-3); }
.punkt.ok { background: var(--ok); }
.punkt.fehler { background: var(--fehler); }

/* Meldungen */
.hinweis { padding: 12px 14px; border-radius: var(--radius-klein); border: 1px solid var(--linie-stark); background: var(--flaeche-2); margin-bottom: 14px; }
.hinweis.ok { background: var(--ok-weich); border-color: var(--ok); }
.hinweis.warn { background: var(--warnung-weich); border-color: var(--warnung); }
.hinweis.fehler { background: var(--fehler-weich); border-color: var(--fehler); }
.hinweis ul { margin: 6px 0 0; padding-left: 20px; }

/* Tabelle der Seiten */
table.liste { width: 100%; border-collapse: collapse; }
table.liste th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid var(--linie-stark);
}
table.liste td { padding: 12px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.liste tr:last-child td { border-bottom: 0; }
table.liste tr.aus td { opacity: 0.62; }
.domains a { display: block; font-weight: 600; }
.klein-text { font-size: 13px; }
.rechtsbuendig { text-align: right; white-space: nowrap; }

/* Formulare */
label { display: block; font-weight: 600; margin: 12px 0 5px; }
label.haken { font-weight: 500; display: flex; align-items: center; gap: 8px; margin: 8px 0; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--kachel);
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); padding: 9px 11px;
}
textarea { min-height: 84px; font-family: var(--mono); font-size: 13.5px; resize: vertical; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--akzent); }
.hilfe { color: var(--text-2); font-size: 13px; margin: 4px 0 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
fieldset { border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 4px 14px 12px; margin: 16px 0 0; }
legend { font-family: var(--marke); padding: 0 6px; }

/* Vergleich */
pre.diff { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 10px 0; overflow-x: auto; margin: 8px 0 0; }
pre.diff span { display: block; padding: 0 14px; white-space: pre; }
pre.diff .plus { background: var(--ok-weich); color: var(--ok); }
pre.diff .minus { background: var(--fehler-weich); color: var(--fehler); }
pre.diff .kopf-z { color: var(--text-3); }
pre.diff .stelle { color: var(--neben2-text); background: var(--neben2-weich); }
img.qr { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: var(--radius-klein); border: 1px solid var(--linie-stark); }
.geheimnis { word-break: break-all; background: var(--flaeche-2); padding: 8px 10px; border-radius: var(--radius-klein); border: 1px solid var(--linie); }

/* Handy */
@media (max-width: 760px) {
  table.liste thead { display: none; }
  table.liste, table.liste tbody, table.liste tr, table.liste td { display: block; width: 100%; }
  table.liste tr { border: 1px solid var(--linie); border-radius: var(--radius-klein); margin-bottom: 12px; padding: 6px 4px; background: var(--kachel); }
  table.liste td { border: 0; padding: 5px 10px; }
  table.liste td[data-feld]::before { content: attr(data-feld); display: block; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
  .rechtsbuendig { text-align: left; }
  h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
