/*
 * MIntelligence — Gestaltung nach mayfair-hamburg.de
 *
 * Die Werte unten sind nicht geschätzt, sondern am 12.08.2026 aus den berechneten
 * Stilen der Website ausgelesen. Wer sie ändert, sollte dort gegenprüfen.
 *
 * Schriften: die Website benutzt "Demos Next Pro" (kommerziell, hier bewusst NICHT
 * mitgeliefert) und "Aptos" (liegt auf Windows-Rechnern mit Microsoft Office bei).
 * Die Stapel unten nehmen beide, wenn sie vorhanden sind, und fallen sonst sauber
 * auf systemeigene Schriften zurück.
 */

/* Die Hausschriften, aus Mayfairs eigener Auslieferung uebernommen.
 *
 * Beide sind kommerziell lizenziert; die Lizenz gehoert Mayfair, und diese
 * Anwendung wird fuer Mayfair gebaut. Herkunft, Lizenzlage und was das fuer die
 * Weiterverwendung heisst: app/assets/fonts/README.md.
 *
 * Direkt von der Website laden geht nicht — sie liefert die Dateien ohne
 * Access-Control-Allow-Origin, und Browser laden Schriften nur mit CORS-Freigabe
 * (geprueft 13.08.2026, alle fuenf endeten in status "error"). Kopieren ist hier
 * also kein Abkuerzen, sondern der einzige Weg.
 */
@font-face {
  font-family: "Aptos";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/aptos-regular-e80b2235.woff2") format("woff2");
}
@font-face {
  font-family: "Demos Next Pro";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/demos-next-pro-300-5479b3b7.woff2") format("woff2");
}
@font-face {
  font-family: "Demos Next Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/demos-next-pro-400-f7a2596c.woff2") format("woff2");
}
@font-face {
  font-family: "Demos Next Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/demos-next-pro-500-6e4b0eae.woff2") format("woff2");
}
@font-face {
  font-family: "Demos Next Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/demos-next-pro-700-4d43766d.woff2") format("woff2");
}

:root {
  /* Farben, ausgelesen von mayfair-hamburg.de */
  --mf-crimson: #a70a43;        /* rgb(167, 10, 67) — Überschriften, Navigation (aus dem CSS der Website) */
  --mf-crimson-logo: #a71545;   /* der Rotton IN der Logodatei — minimal anders, siehe /branding */
  --mf-crimson-light: #cc3366;  /* rgb(204, 51, 102) — Links, Hover */
  --mf-ink: #333333;            /* rgb(51, 51, 51) — Fließtext */
  --mf-muted: #8f8f86;          /* rgb(143, 143, 134) — Unterzeilen, Sekundäres */
  --mf-white: #ffffff;
  --mf-paper: #faf9f8;          /* abgeleitet: ruhiger Flächenton */
  --mf-rule: #e6e3e0;           /* abgeleitet: Linien */
  --mf-crimson-wash: #fdf3f6;   /* abgeleitet: sehr helle Markenfläche */

  --mf-ok: #2f6f4f;
  --mf-warn: #8a6100;
  --mf-error: #a3241c;

  /* Schrift */
  --mf-display: "Demos Next Pro", Aptos, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mf-body: Aptos, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mf-mono: "Cascadia Mono", "SF Mono", Consolas, "DejaVu Sans Mono", monospace;

  --mf-body-size: 18px;
  --mf-body-lh: 1.45;

  /* Raster */
  --mf-space: 8px;
  --mf-radius: 4px;
  --mf-max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--mf-white);
  color: var(--mf-ink);
  font-family: var(--mf-body);
  font-size: var(--mf-body-size);
  line-height: var(--mf-body-lh);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--mf-display);
  color: var(--mf-crimson);
  margin: 0 0 calc(var(--mf-space) * 2);
  line-height: 1.2;
}

h1 { font-size: 41px; font-weight: 300; }
h2 { font-size: 28px; font-weight: 300; }
h3 { font-size: 22px; font-weight: 500; }

/* Die Website setzt Unterzeilen in Grau statt in der Markenfarbe. */
.mf-subtitle {
  font-family: var(--mf-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--mf-muted);
  margin: calc(var(--mf-space) * -1) 0 calc(var(--mf-space) * 3);
}

p { margin: 0 0 calc(var(--mf-space) * 2); }

a { color: var(--mf-crimson-light); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, .mf-mono { font-family: var(--mf-mono); font-size: 0.9em; }
pre {
  background: var(--mf-paper);
  border: 1px solid var(--mf-rule);
  border-radius: var(--mf-radius);
  padding: calc(var(--mf-space) * 2);
  overflow-x: auto;
}

/* ---------- Grundgerüst ---------- */

.mf-shell { min-height: 100vh; display: flex; flex-direction: column; }

.mf-header {
  border-bottom: 1px solid var(--mf-rule);
  background: var(--mf-white);
}

.mf-header__inner {
  max-width: var(--mf-max);
  margin: 0 auto;
  padding: calc(var(--mf-space) * 2.5) calc(var(--mf-space) * 3);
  display: flex;
  align-items: center;
  gap: calc(var(--mf-space) * 4);
  flex-wrap: wrap;
}

.mf-wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.mf-wordmark:hover { text-decoration: none; }
/* Die Logodatei traegt Pferd und Wortmarke, deshalb steht daneben kein Text. */
.mf-logo { height: 54px; width: auto; display: block; }

.mf-nav { display: flex; gap: calc(var(--mf-space) * 4); margin-left: auto; }
.mf-nav a {
  font-family: var(--mf-display);
  font-size: 20px;
  font-weight: 300;
  color: var(--mf-crimson);
}

.mf-main {
  flex: 1;
  max-width: var(--mf-max);
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--mf-space) * 6) calc(var(--mf-space) * 3);
}

.mf-footer {
  border-top: 1px solid var(--mf-rule);
  color: var(--mf-muted);
  font-size: 15px;
}
.mf-footer div {
  max-width: var(--mf-max);
  margin: 0 auto;
  padding: calc(var(--mf-space) * 3);
}

/* ---------- Komponenten ---------- */

.mf-page-header { margin-bottom: calc(var(--mf-space) * 5); }
.mf-page-header--centered { text-align: center; }
.mf-page-header__eyebrow {
  font-family: var(--mf-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mf-muted);
  margin: 0 0 var(--mf-space);
}

.mf-card {
  background: var(--mf-white);
  border: 1px solid var(--mf-rule);
  border-radius: var(--mf-radius);
  padding: calc(var(--mf-space) * 3);
  margin-bottom: calc(var(--mf-space) * 3);
}
.mf-card--quiet { background: var(--mf-paper); }
.mf-card--brand { background: var(--mf-crimson-wash); border-color: #f0d8e1; }
.mf-card__title { margin-bottom: calc(var(--mf-space) * 2); }

.mf-button {
  display: inline-block;
  font-family: var(--mf-body);
  font-size: 16px;
  line-height: 1.2;
  padding: 11px 22px;
  border-radius: var(--mf-radius);
  border: 1px solid var(--mf-crimson);
  background: var(--mf-crimson);
  color: var(--mf-white);
  cursor: pointer;
  text-decoration: none;
}
.mf-button:hover { background: var(--mf-crimson-light); border-color: var(--mf-crimson-light); text-decoration: none; }
.mf-button--secondary { background: transparent; color: var(--mf-crimson); }
.mf-button--secondary:hover { background: var(--mf-crimson-wash); color: var(--mf-crimson); }
.mf-button--quiet {
  background: transparent; color: var(--mf-muted); border-color: var(--mf-rule);
}
.mf-button--quiet:hover { background: var(--mf-paper); color: var(--mf-ink); }

.mf-badge {
  display: inline-block;
  font-family: var(--mf-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.mf-badge--brand { color: var(--mf-crimson); background: var(--mf-crimson-wash); }
.mf-badge--muted { color: var(--mf-muted); }
.mf-badge--ok { color: var(--mf-ok); }
.mf-badge--warn { color: var(--mf-warn); }
.mf-badge--error { color: var(--mf-error); }

.mf-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.mf-table th {
  text-align: left;
  font-family: var(--mf-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-muted);
  font-weight: 400;
  padding: 0 calc(var(--mf-space) * 1.5) var(--mf-space);
  border-bottom: 1px solid var(--mf-rule);
}
.mf-table td {
  padding: calc(var(--mf-space) * 1.5);
  border-bottom: 1px solid var(--mf-rule);
  vertical-align: top;
}
.mf-table tr:last-child td { border-bottom: 0; }
.mf-table__empty { color: var(--mf-muted); font-style: italic; }
.mf-table-scroll { overflow-x: auto; }

.mf-flash {
  border-left: 3px solid var(--mf-crimson);
  background: var(--mf-crimson-wash);
  padding: calc(var(--mf-space) * 2) calc(var(--mf-space) * 3);
  border-radius: 0 var(--mf-radius) var(--mf-radius) 0;
  margin-bottom: calc(var(--mf-space) * 3);
}
.mf-flash--alert { border-color: var(--mf-error); background: #fdf1f0; }

.mf-field { display: block; margin-bottom: calc(var(--mf-space) * 2.5); }
.mf-field__label {
  display: block;
  font-size: 15px;
  color: var(--mf-muted);
  margin-bottom: calc(var(--mf-space) * 0.75);
}
.mf-field input[type="text"],
.mf-field input[type="email"],
.mf-field input[type="password"] {
  width: 100%;
  font-family: var(--mf-body);
  font-size: 17px;
  padding: 10px 12px;
  border: 1px solid var(--mf-rule);
  border-radius: var(--mf-radius);
  background: var(--mf-white);
  color: var(--mf-ink);
}
.mf-field input:focus {
  outline: 2px solid var(--mf-crimson-light);
  outline-offset: 1px;
  border-color: var(--mf-crimson-light);
}
.mf-field__hint { font-size: 14px; color: var(--mf-muted); margin-top: 4px; }

.mf-stat { display: flex; gap: calc(var(--mf-space) * 5); flex-wrap: wrap;
  margin-bottom: calc(var(--mf-space) * 4); }
.mf-card .mf-stat { margin-bottom: 0; }
.mf-stat__item { min-width: 140px; }
.mf-stat__value {
  font-family: var(--mf-display);
  font-size: 34px;
  font-weight: 300;
  color: var(--mf-crimson);
  line-height: 1;
}
.mf-stat__label {
  font-family: var(--mf-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-muted);
  margin-top: var(--mf-space);
}

.mf-errors { color: var(--mf-error); padding-left: 20px; margin: 0 0 calc(var(--mf-space) * 2); }

/* Die Anmeldeseite traegt keinen Kopf. Sie besteht aus dem Zeichen und einem
   Kasten mit zwei Feldern — deshalb steht sie mittig auf der Seite, nicht oben. */
.mf-auth {
  max-width: 420px;
  margin: 0 auto;
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mf-auth__mark { text-align: center; margin-bottom: calc(var(--mf-space) * 5); }
.mf-auth__mark .mf-logo { height: 132px; margin: 0 auto; }

@media (max-width: 720px) {
  .mf-auth__mark .mf-logo { height: 96px; }
  .mf-auth { min-height: calc(100vh - 180px); }
}
.mf-inline-form { display: flex; gap: var(--mf-space); align-items: flex-end; flex-wrap: wrap;
  margin-bottom: calc(var(--mf-space) * 3); }
.mf-inline-form .mf-field { flex: 1; min-width: 220px; margin-bottom: 0; }

/* ---------- Diagramme ---------- */

.mf-chart { margin: 0 0 calc(var(--mf-space) * 4); }
.mf-chart__title {
  font-family: var(--mf-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--mf-crimson);
  margin-bottom: var(--mf-space);
}
.mf-chart__note { color: var(--mf-muted); font-size: 15px; margin-bottom: calc(var(--mf-space) * 2); }
.mf-chart__canvas { position: relative; }
.mf-chart__data { margin-top: calc(var(--mf-space) * 2); }
.mf-chart__data summary {
  cursor: pointer;
  font-family: var(--mf-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mf-muted);
}
.mf-chart__data summary:hover { color: var(--mf-ink); }
.mf-chart__data .mf-table { margin-top: calc(var(--mf-space) * 2); }

.mf-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: calc(var(--mf-space) * 4);
}

/* ---------- Branding-Seite ---------- */

.mf-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: calc(var(--mf-space) * 2); }
.mf-swatch { border: 1px solid var(--mf-rule); border-radius: var(--mf-radius); overflow: hidden; }
.mf-swatch__chip { height: 78px; }
.mf-swatch__meta { padding: calc(var(--mf-space) * 1.5); font-family: var(--mf-mono); font-size: 12px; }
.mf-swatch__meta strong { display: block; font-family: var(--mf-body); font-size: 14px; margin-bottom: 3px; }
.mf-swatch__meta span { color: var(--mf-muted); }

.mf-specimen { border-bottom: 1px solid var(--mf-rule); padding: calc(var(--mf-space) * 2) 0; }
.mf-specimen:last-child { border-bottom: 0; }
.mf-specimen__note { font-family: var(--mf-mono); font-size: 12px; color: var(--mf-muted); }

@media (max-width: 720px) {
  h1 { font-size: 32px; }
  .mf-main { padding: calc(var(--mf-space) * 4) calc(var(--mf-space) * 2.5); }
  .mf-header__inner { gap: calc(var(--mf-space) * 2); }
  .mf-nav { gap: calc(var(--mf-space) * 2.5); width: 100%; margin-left: 0; }
  .mf-nav a { font-size: 17px; }
}
