/*
 * Zentrale: Mayfair-Gestaltung
 *
 * Unveraendert aus dem alten Portal (MFO-Portal, src/app/globals.css), dessen Regeln
 * 1:1 aus mintelligence (app/assets/stylesheets/application.css) stammen und um
 * "portal:"-Regeln ergaenzt sind. Die Werte wurden am 2026-08-12 aus den berechneten
 * Stilen von mayfair-hamburg.de gelesen, nicht geschaetzt. Keine neuen Farben; nur
 * die Tokens unten benutzen.
 *
 * Einziger Unterschied zum alten Portal: Dort setzte next/font die Schriften ueber
 * --font-demos-next-pro und --font-aptos. Hier stehen sie als @font-face direkt
 * darunter, wie in mintelligence; die Stapel in :root fallen ueber die Familiennamen
 * auf sie zurueck. Herkunft und Lizenz: app/assets/fonts/README.md.
 */

@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: 500;
  font-display: swap;
  src: url("/assets/demos-next-pro-500-6e4b0eae.woff2") format("woff2");
}

:root {
  /* Colors, read from mayfair-hamburg.de */
  --mf-crimson: #a70a43;        /* rgb(167, 10, 67): headings, navigation (site CSS) */
  --mf-crimson-logo: #a71545;   /* the red inside the logo file, slightly different on purpose */
  --mf-crimson-light: #cc3366;  /* rgb(204, 51, 102): links, hover */
  --mf-ink: #333333;            /* rgb(51, 51, 51): body text */
  --mf-muted: #8f8f86;          /* rgb(143, 143, 134): subtitles, secondary text */
  --mf-white: #ffffff;
  --mf-paper: #faf9f8;          /* derived: quiet surface */
  --mf-rule: #e6e3e0;           /* derived: lines */
  --mf-crimson-wash: #fdf3f6;   /* derived: very light brand surface */

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

  /* The companies' accent colours, from their CI templates; Mayfair's is --mf-crimson. */
  --mf-gator: #00694b;          /* green */
  --mf-maryland: #35445e;       /* dark blue */

  /* Type */
  --mf-display: var(--font-demos-next-pro, "Demos Next Pro"), var(--font-aptos, Aptos), "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --mf-body: var(--font-aptos, 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;

  /* Grid */
  --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%;
  /* portal: a word longer than the line (a web address, an e-mail address) wraps instead
     of pushing the page sideways on phones. Tables keep their widths and scroll. */
  overflow-wrap: break-word;
}

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; }

/* Mayfair sets subtitles in grey, not in the brand color. */
.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;
}

/* ---------- Shell ---------- */

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

/* portal: signed in, the navigation is a sidebar on the left, the page and footer to its
   right. Signed out (sign-in page) the shell stays one column. */
.mf-shell:has(> .mf-sidebar) {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
}
.mf-shell:has(> .mf-sidebar) > .mf-sidebar { grid-row: 1 / -1; }
.mf-shell:has(> .mf-sidebar) > .mf-main,
.mf-shell:has(> .mf-sidebar) > .mf-footer { grid-column: 2; }

.mf-wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.mf-wordmark:hover { text-decoration: none; }
/* The logo file carries horse and wordmark, so no text stands next to it. */
.mf-logo { height: 54px; width: auto; display: block; }

.mf-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: calc(var(--mf-space) * 4);
  padding: calc(var(--mf-space) * 3) calc(var(--mf-space) * 2.5);
  background: var(--mf-paper);
  border-right: 1px solid var(--mf-rule);
}
.mf-sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--mf-space) * 2); }
.mf-sidebar .mf-sidebar__toggle { display: none; }
.mf-sidebar__nav { display: flex; flex-direction: column; gap: calc(var(--mf-space) * 3); }
.mf-sidebar__nav ul { list-style: none; margin: 0; padding: 0; }
.mf-sidebar__label { padding-left: 12px; }
.mf-sidebar__nav a {
  display: block;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--mf-radius) var(--mf-radius) 0;
  font-family: var(--mf-display);
  font-size: 18px;
  font-weight: 300;
  color: var(--mf-crimson);
}
.mf-sidebar__nav a:hover { background: var(--mf-crimson-wash); text-decoration: none; }
/* portal: marks the page you are on. */
.mf-sidebar__nav a[aria-current="page"] { background: var(--mf-crimson-wash); border-left-color: var(--mf-crimson); font-weight: 500; }
.mf-sidebar .mf-user {
  margin-top: auto;
  flex-wrap: wrap;
  padding-top: calc(var(--mf-space) * 2);
  border-top: 1px solid var(--mf-rule);
}

.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);
}

/* ---------- Components ---------- */

.mf-page-header { margin-bottom: calc(var(--mf-space) * 5); }
.mf-page-header--centered { text-align: center; }
.mf-page-header__eyebrow,
.mf-card__eyebrow /* portal: same small line above a card title */,
.mf-sidebar__label /* portal: and above a group in the sidebar */ {
  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); }
/* portal: the last element needs no bottom margin; mintelligence wrote
   style="margin-bottom:0" at every call site instead. */
.mf-card > :last-child { margin-bottom: 0; }

/* portal: a whole card as a link (Card with href). The title link stretches over the
   card, so the entire surface is clickable while the link text stays the accessible name. */
.mf-card--link { position: relative; transition: border-color 0.15s ease; }
.mf-card--link:hover { border-color: var(--mf-crimson-light); }
.mf-card__link { color: inherit; }
.mf-card__link:hover { text-decoration: none; }
.mf-card__link::after { content: ""; position: absolute; inset: 0; }
.mf-card__link:focus-visible { outline: none; }
.mf-card--link:has(.mf-card__link:focus-visible) {
  outline: 2px solid var(--mf-crimson-light);
  outline-offset: 1px;
}

.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); }
/* portal: a small symbol before a button's label, e.g. the Microsoft logo. */
.mf-button__icon { display: inline-flex; vertical-align: -4px; margin-right: var(--mf-space); }
/* portal: a smaller button for a row of many, e.g. suggested questions (Button small). */
.mf-button--small { font-size: 15px; padding: 7px 14px; }
/* portal: a button across the whole width, e.g. on the sign-in card. */
.mf-button--block { width: 100%; text-align: center; }
/* portal: a quiet "oder" line between two ways of doing the same thing. */
.mf-divider {
  display: flex; align-items: center; gap: calc(var(--mf-space) * 1.5);
  margin: calc(var(--mf-space) * 3) 0; color: var(--mf-muted); font-size: 14px;
}
.mf-divider::before, .mf-divider::after { content: ""; flex: 1; border-top: 1px solid var(--mf-rule); }
/* portal: a button that cannot be used right now (e.g. while saving) looks like it. */
.mf-button:disabled { opacity: 0.5; pointer-events: none; }
/* portal: buttons next to each other keep their distance, also when they wrap. */
.mf-actions { display: flex; flex-wrap: wrap; gap: var(--mf-space); align-items: center; }
/* portal: a field or a message right below a row of buttons keeps some distance. */
.mf-actions + .mf-field, .mf-actions + .mf-flash { margin-top: calc(var(--mf-space) * 2.5); }
/* portal: two rows of buttons, e.g. a download and then the page's own buttons. */
.mf-actions + .mf-actions { margin-top: calc(var(--mf-space) * 2); }

.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;
}
/* portal: several badges in a row, e.g. the groups a person is in. */
.mf-badges { display: flex; flex-wrap: wrap; gap: calc(var(--mf-space) * 0.75); }
/* portal: a plain list with a value and an action per row, e.g. a group's members. */
.mf-list { list-style: none; margin: 0 0 calc(var(--mf-space) * 2.5); padding: 0; }
.mf-list__row { display: flex; justify-content: space-between; align-items: center; gap: var(--mf-space); padding: calc(var(--mf-space) * 0.75) 0; border-bottom: 1px solid var(--mf-rule); }
.mf-list__row:last-child { border-bottom: 0; }
.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; }

/* A cell that stacks a label and a small toggle (e.g. the name over its M365-Profil button). */
.mf-stack-tight { display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--mf-space) * 0.5); }

/* The expandable detail row under an account, and the Microsoft 365 profile it shows. */
.mf-row-detail td { background: var(--mf-paper); }
.mf-profile { display: grid; grid-template-columns: max-content 1fr; gap: calc(var(--mf-space) * 0.5) calc(var(--mf-space) * 2); margin: 0; }
.mf-profile dt { color: var(--mf-muted); font-size: 14px; }
.mf-profile dd { margin: 0; color: var(--mf-ink); }
.mf-profile + .mf-note { margin-top: calc(var(--mf-space) * 1.5); }
@media (max-width: 640px) {
  .mf-profile { grid-template-columns: 1fr; gap: 0; }
  .mf-profile dt { margin-top: calc(var(--mf-space) * 1); }
  .mf-profile dd { margin-bottom: calc(var(--mf-space) * 0.25); }
}

.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"],
.mf-field input[type="search"],
.mf-field select,
.mf-field textarea {
  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,
.mf-field textarea:focus,
.mf-field select: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-field textarea { min-height: 96px; resize: vertical; line-height: var(--mf-body-lh); }
/* portal: a field that failed validation says why, right below it. */
.mf-field__error { font-size: 14px; color: var(--mf-error); margin: 4px 0 0; }
.mf-field--invalid input,
.mf-field--invalid textarea,
.mf-field--invalid select { border-color: var(--mf-error); }

/* Ported from mintelligence (SSO branch): a checkbox with its label. */
.mf-check { display: flex; gap: var(--mf-space); align-items: baseline; font-size: 16px; cursor: pointer; }
.mf-check[hidden] { display: none; }
.mf-check input { flex: none; accent-color: var(--mf-crimson); }
/* portal: several checkboxes under one label. */
.mf-fieldset { border: 0; padding: 0; margin: 0 0 calc(var(--mf-space) * 2.5); min-width: 0; }
.mf-fieldset > legend { padding: 0; }
.mf-checks { display: flex; flex-wrap: wrap; gap: var(--mf-space) calc(var(--mf-space) * 3); }
/* portal: one choice per line, scrolling within when there are many (FieldSet stacked). */
.mf-checks--stacked { flex-direction: column; flex-wrap: nowrap; max-height: 320px; overflow-y: auto; }

/* Ported from mintelligence (SSO branch): several buttons in one table cell. */
.mf-row-actions { display: flex; flex-wrap: wrap; gap: var(--mf-space); align-items: center; }

/* portal: formatted text (Markdown) inside cards. */
.mf-prose > :last-child { margin-bottom: 0; }
.mf-prose ul,
.mf-prose ol { margin: 0 0 calc(var(--mf-space) * 2); padding-left: calc(var(--mf-space) * 3); }
.mf-prose li { margin-bottom: calc(var(--mf-space) * 0.5); }
.mf-prose h3,
.mf-prose h4 { font-size: 19px; margin: calc(var(--mf-space) * 3) 0 var(--mf-space); }
.mf-prose blockquote {
  margin: 0 0 calc(var(--mf-space) * 2);
  padding-left: calc(var(--mf-space) * 2);
  border-left: 3px solid var(--mf-rule);
  color: var(--mf-muted);
}
.mf-prose hr { border: 0; border-top: 1px solid var(--mf-rule); margin: calc(var(--mf-space) * 3) 0; }
/* portal: text followed by more (a list, a search field) keeps a paragraph's distance to it. */
.mf-prose:not(:last-child) { margin-bottom: calc(var(--mf-space) * 2); }
/* portal: a "Mehr dazu" link below a card's text. */
.mf-card__more { margin-top: calc(var(--mf-space) * 2); }

/* portal: a program's logo next to its name, or its first letter in the same square. */
.mf-with-logo { display: flex; align-items: center; gap: calc(var(--mf-space) * 1.5); }
.mf-logo-thumb {
  flex: none;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border: 1px solid var(--mf-rule);
  border-radius: var(--mf-radius);
  background: var(--mf-white);
}
.mf-logo-thumb--letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mf-paper);
  color: var(--mf-muted);
  font-family: var(--mf-display);
  font-size: 16px;
}
.mf-logo-thumb--large { width: 64px; height: 64px; }
.mf-file-name { font-size: 15px; color: var(--mf-ink); }
/* portal: a small grey side note, e.g. a skill's name in Claude or a file's size. */
.mf-note { font-size: 15px; color: var(--mf-muted); }

/* portal: an uploaded image or PDF shown full width in a card (org charts). */
.mf-figure {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--mf-rule);
  border-radius: var(--mf-radius);
  background: var(--mf-white);
}
.mf-pdf {
  display: block;
  width: 100%;
  height: 75vh;
  min-height: 480px;
  border: 1px solid var(--mf-rule);
  border-radius: var(--mf-radius);
  background: var(--mf-paper);
}
.mf-field input[type="file"] { font-family: var(--mf-body); font-size: 15px; max-width: 100%; }

.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; }
/* portal: a labelled part below the key figures of a card, e.g. a chart. */
.mf-card .mf-stat + .mf-card__eyebrow { margin-top: calc(var(--mf-space) * 4); }
.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);
}

/* portal: a short addition below a key figure, e.g. "von 125 Projekten". */
.mf-stat__detail { font-size: 15px; margin-top: calc(var(--mf-space) * 0.75); }

/* portal: charts (BarList, ColumnChart, Meter, DotMatrix). Marks in the brand color,
   grid and axes as hairlines, every number also as text. Sizes are SVG attributes, so no
   inline styles are needed. */
.mf-chart__empty { color: var(--mf-muted); font-size: 15px; margin: 0; }
.mf-bars__bar, .mf-columns__bar, .mf-matrix__dot, .mf-meter__fill { fill: var(--mf-crimson); }
.mf-bars { list-style: none; margin: 0; padding: 0; }
.mf-bars__row {
  display: grid; grid-template-columns: minmax(96px, 40%) 1fr 52px; align-items: center;
  gap: calc(var(--mf-space) * 1.25); padding: 3px 0;
}
.mf-bars__label { font-size: 15px; overflow-wrap: anywhere; }
.mf-bars__track { display: block; }
.mf-bars__value { font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.mf-bars__row:hover .mf-bars__bar,
.mf-columns__column:hover .mf-columns__bar,
.mf-matrix__cell:hover .mf-matrix__dot { fill: var(--mf-crimson-light); }
/* Room above the plot for the value on the highest column, 180 px plot, 20 px of labels. */
.mf-columns { position: relative; margin-left: 40px; }
.mf-columns__grid { position: absolute; top: 16px; left: 0; overflow: visible; }
.mf-columns__grid line { stroke: var(--mf-rule); stroke-width: 1; }
.mf-columns__grid text { fill: var(--mf-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.mf-columns__bars { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; height: 216px; }
.mf-columns__column { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.mf-columns__column svg { display: block; }
.mf-columns__cap { font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.mf-columns__label { font-size: 12px; line-height: 20px; height: 20px; color: var(--mf-muted); white-space: nowrap; }
.mf-meter__bar { display: block; margin: var(--mf-space) 0; }
.mf-meter__track { fill: var(--mf-crimson-wash); }
.mf-meter__legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--mf-space); font-size: 15px; }
.mf-matrix { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 15px; }
.mf-matrix th { font-weight: 400; font-size: 13px; color: var(--mf-muted); text-align: center; padding: 4px; }
.mf-matrix th[scope="row"] { text-align: left; }
.mf-matrix__cell { height: 64px; text-align: center; background: var(--mf-paper); border-radius: var(--mf-radius); }
.mf-matrix__cell svg { vertical-align: middle; }
.mf-matrix__cell--highlight { background: var(--mf-crimson-wash); }
.mf-matrix__count { margin-left: var(--mf-space); font-variant-numeric: tabular-nums; }
.mf-matrix__none { color: var(--mf-muted); }
.mf-chart__table { margin-top: calc(var(--mf-space) * 1.5); font-size: 15px; }
.mf-chart__table summary { cursor: pointer; color: var(--mf-crimson-light); }
.mf-chart__table .mf-table-scroll { margin-top: var(--mf-space); }
.mf-table__number, .mf-chart__table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
/* portal: two columns per period (ColumnChart with compare), the second one grey. */
.mf-columns__pair { display: flex; align-items: flex-end; gap: 2px; }
.mf-columns__bar--compare { fill: var(--mf-muted); }
.mf-columns__column:hover .mf-columns__bar--compare { fill: var(--mf-ink); }
/* portal: the whole of a bar behind its darker part (BarList with parts). */
.mf-bars__rest { fill: var(--mf-rule); }
.mf-bars--parts .mf-bars__row { grid-template-columns: minmax(96px, 40%) 1fr 76px; }
/* portal: what the colors of a chart stand for. */
.mf-legend {
  list-style: none; display: flex; flex-wrap: wrap; gap: var(--mf-space) calc(var(--mf-space) * 2);
  margin: var(--mf-space) 0 0; padding: 0; font-size: 15px;
}
.mf-legend li { display: inline-flex; align-items: center; gap: var(--mf-space); }
.mf-legend svg { display: block; }

.mf-errors { color: var(--mf-error); padding-left: 20px; margin: 0 0 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);
  /* portal: the same distance to what follows as a card's. */
  margin-bottom: calc(var(--mf-space) * 3);
}
/* portal: cards in a grid get their spacing from the grid gap. */
.mf-grid-2 > .mf-card { margin-bottom: 0; }
/* portal: wider tiles, so four areas sit as a calm 2 x 2 instead of 3 + 1. */
.mf-grid-2--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
/* portal: narrower tiles, so three sit side by side (where to turn with what, on /it).
   A tile's last button sits at its bottom, so the buttons of a row line up. */
.mf-grid-2--narrow {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: calc(var(--mf-space) * 3);
}
.mf-grid-2--narrow > .mf-card { display: flex; flex-direction: column; }
.mf-grid-2--narrow > .mf-card > .mf-button:last-child { margin-top: auto; align-self: flex-start; }

/* portal: contacts in a card: the name, a note, then the ways to reach them. */
.mf-contacts { list-style: none; margin: 0 0 calc(var(--mf-space) * 2); padding: 0; }
.mf-contacts li { padding: calc(var(--mf-space) * 1.5) 0; border-top: 1px solid var(--mf-rule); }
.mf-contacts li:last-child { border-bottom: 1px solid var(--mf-rule); }
.mf-contacts p { margin: 0; }
.mf-contacts__name { font-weight: 600; }
.mf-contacts__ways { display: flex; flex-wrap: wrap; gap: 0 calc(var(--mf-space) * 2); font-size: 16px; }

/* portal: questions one click away (QuickQuestions), below the text or form above them. */
.mf-quick { margin-top: calc(var(--mf-space) * 3); }

/* portal: the assistant chat. The question on the right, the answer in a card below. */
.mf-chat { display: flex; flex-direction: column; gap: calc(var(--mf-space) * 3); margin-bottom: calc(var(--mf-space) * 3); }
.mf-chat:empty { display: none; }
.mf-chat__turn { display: flex; flex-direction: column; }
.mf-chat__turn > .mf-card { margin-bottom: 0; }
.mf-chat__question {
  align-self: flex-end;
  max-width: min(100%, 640px);
  margin: 0 0 var(--mf-space);
  padding: calc(var(--mf-space) * 1.5) calc(var(--mf-space) * 2);
  background: var(--mf-crimson-wash);
  border-radius: var(--mf-radius);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* portal: the sources under an answer. */
.mf-sources { margin-top: calc(var(--mf-space) * 2); padding-top: calc(var(--mf-space) * 1.5); border-top: 1px solid var(--mf-rule); font-size: 16px; }
.mf-sources ul { margin: 0; padding-left: calc(var(--mf-space) * 2.5); }

/* portal: a generated diagram. Wide ones scroll inside their box instead of widening the page. */
.mf-diagram {
  overflow-x: auto; text-align: center; padding: calc(var(--mf-space) * 2) 0;
  margin-bottom: calc(var(--mf-space) * 2); border-bottom: 1px solid var(--mf-rule);
}
.mf-diagram svg { height: auto; }

/* portal: a section heading that follows a block keeps some air above it. */
.mf-section-title { margin-top: calc(var(--mf-space) * 6); }

/* portal: links to the sections of a long page, above them. */
.mf-page-nav { margin-bottom: calc(var(--mf-space) * 3); }

/* portal: a foldable part (Disclosure): a line with a plus that opens to its content.
   Several in a row share their dividing lines, like a list. */
.mf-disclosure { border-top: 1px solid var(--mf-rule); }
.mf-disclosure + :not(.mf-disclosure) { margin-top: calc(var(--mf-space) * 2); }
.mf-disclosure:has(+ :not(.mf-disclosure)), .mf-disclosure:last-child { border-bottom: 1px solid var(--mf-rule); }
.mf-disclosure__summary {
  display: flex;
  gap: calc(var(--mf-space) * 1.5);
  align-items: baseline;
  padding: calc(var(--mf-space) * 1.5) 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.mf-disclosure__summary::-webkit-details-marker { display: none; }
.mf-disclosure__summary::before {
  content: "+";
  flex: none;
  width: 1ch;
  color: var(--mf-crimson);
  font-family: var(--mf-mono);
}
.mf-disclosure[open] > .mf-disclosure__summary::before { content: "–"; }
.mf-disclosure__summary:hover { color: var(--mf-crimson); }
.mf-disclosure__body { padding: 0 0 calc(var(--mf-space) * 2) calc(var(--mf-space) * 1.5 + 1ch); }
.mf-disclosure__body > :last-child { margin-bottom: 0; }

/* ---------- Sign-in (ported from mintelligence) ---------- */

/* The sign-in page has no header. It is the logo and a box with two fields, so it sits
   in the middle of the page, not at the top. */
.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; }

/* Zweiter Faktor der Notfallkonten, wie in MIntelligence: App einrichten mit
   QR-Code, die Wiederherstellungscodes einmal zum Abschreiben. */
.mf-auth--wide { max-width: 560px; }
.mf-auth__back { text-align: center; margin-top: calc(var(--mf-space) * 2); font-size: 15px; }
.mf-numbered { padding-left: calc(var(--mf-space) * 3); margin: 0 0 calc(var(--mf-space) * 2); }
.mf-numbered li { margin-bottom: calc(var(--mf-space) * 0.5); }
/* Schwarz auf Weiss mit Ruhezone steckt im SVG selbst; hier nur die Groesse. */
.mf-qr { margin: 0 auto calc(var(--mf-space) * 2); width: 220px; max-width: 100%; }
.mf-qr svg { display: block; width: 100%; height: auto; }
/* Ein Geheimnis, das genau einmal angezeigt wird: ein Klick markiert es ganz.
   In Vierergruppen umbrechen nur zwischen den Gruppen, nicht mitten in einer. */
.mf-secret {
  user-select: all; -webkit-user-select: all;
  white-space: pre-wrap; word-break: break-all;
  background: var(--mf-white); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius);
  padding: var(--mf-space) calc(var(--mf-space) * 1.5); font-family: var(--mf-mono); font-size: 16px;
}
.mf-secret--grouped { word-break: normal; overflow-wrap: normal; }
/* Zwei Spalten, wo sie passen, sonst eine; ein Code bricht nie in sich um. */
.mf-codes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15ch, 1fr));
  gap: var(--mf-space) calc(var(--mf-space) * 4);
  margin: 0 0 calc(var(--mf-space) * 3);
  padding: calc(var(--mf-space) * 2) calc(var(--mf-space) * 2) calc(var(--mf-space) * 2) calc(var(--mf-space) * 5);
  background: var(--mf-white); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius);
  font-family: var(--mf-mono); font-size: 17px;
  user-select: all; -webkit-user-select: all;
}
.mf-codes li { padding-left: calc(var(--mf-space) * 0.5); white-space: nowrap; }
.mf-codes li::marker { color: var(--mf-muted); font-size: 14px; }

/* Das Protokoll, wie in MIntelligence: Filterleiste, Kleingedrucktes in den
   Zellen, Blaettern. */
.mf-inline-form--filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--mf-space); align-items: end; }
.mf-inline-form--filters .mf-field { min-width: 0; margin-bottom: 0; }
.mf-inline-form--filters .mf-field input, .mf-inline-form--filters .mf-field select { min-width: 0; width: 100%; }
.mf-inline-form--filters .mf-actions { grid-column: 1 / -1; }
/* Freigeben fuer eine Gruppe: ein Feld, breit genug fuer lange Namen (in der
   Filterleiste war es eine Spalte von 130px, Phase 7). */
.mf-inline-form--grant { display: grid; grid-template-columns: minmax(0, 24rem); gap: var(--mf-space); }
.mf-inline-form--grant .mf-field { margin-bottom: 0; }
.mf-cell-note { display: block; font-size: 14px; color: var(--mf-muted); overflow-wrap: anywhere; }
/* Absatz als letztes in einer Karte, ohne Abstand darunter (wie in MIntelligence). */
.mf-flush { margin-bottom: 0; }
/* Ein fehlender Wert (NULL) sieht anders aus als ein leerer Text (CellValueComponent, wie in MIntelligence). */
.mf-cell-null { color: var(--mf-muted); font-style: italic; font-size: 14px; }
/* Die Marke auf /bausteine, aus MIntelligences Gestaltungshandbuch (Entscheidung 4.4). */
.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; border-bottom: 1px solid var(--mf-rule); }
.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); }
/* Die API-Dokumentation (aus MIntelligence): ein Endpunkt je Abschnitt. */
.mf-endpoint { margin-top: calc(var(--mf-space) * 3); padding-top: calc(var(--mf-space) * 2); border-top: 1px solid var(--mf-rule); }
.mf-endpoint__head { display: flex; flex-wrap: wrap; gap: var(--mf-space); align-items: center; }
.mf-endpoint__path { font-size: 17px; letter-spacing: 0; }
.mf-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--mf-space) calc(var(--mf-space) * 2); margin-top: calc(var(--mf-space) * 2); font-size: 16px; }
.mf-pagination__range { color: var(--mf-muted); }
.mf-pagination__links { display: flex; gap: var(--mf-space); }

/* portal: who is signed in, at the bottom of the sidebar. */
.mf-user { display: flex; align-items: center; gap: var(--mf-space); }
.mf-user__name { font-size: 15px; color: var(--mf-muted); }

/* portal: a place to drop files that is also a button to choose them (FileDrop). */
.mf-drop {
  position: relative;
  padding: calc(var(--mf-space) * 2) calc(var(--mf-space) * 2.5);
  margin-bottom: calc(var(--mf-space) * 2);
  border: 1px dashed var(--mf-muted);
  border-radius: var(--mf-radius);
  background: var(--mf-paper);
}
.mf-drop:focus-within { outline: 2px solid var(--mf-crimson-light); outline-offset: 1px; }
.mf-drop--active { border-color: var(--mf-crimson); background: var(--mf-crimson-wash); }
.mf-drop--disabled { opacity: 0.5; }
.mf-drop__label { display: block; font-size: 16px; cursor: pointer; }
.mf-drop__action { color: var(--mf-crimson-light); }
/* The input covers the whole area: a click anywhere chooses files, a drop lands on it. */
.mf-drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mf-drop--disabled .mf-drop__input { cursor: default; }
.mf-drop .mf-field__hint { margin: 0; }

/* portal: two columns side by side (e.g. chat and preview), one below the other on narrow screens. */
.mf-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: calc(var(--mf-space) * 3); align-items: start; }
.mf-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 calc(var(--mf-space) * 3); }
.mf-split__side { position: sticky; top: calc(var(--mf-space) * 3); }
/* portal: one part of a trip in the Reiseplanung preview, below the one before. */
.mf-preview-segment { margin-top: calc(var(--mf-space) * 3); }
.mf-preview-segment .mf-card__eyebrow { margin-bottom: var(--mf-space); }
/* portal: the next step in a card (e.g. "Kalender" below the download) keeps some air above it. */
.mf-actions + .mf-card__eyebrow { margin-top: calc(var(--mf-space) * 3); }
/* portal: the chat's message field, with the steps below it. */
.mf-composer { margin-bottom: calc(var(--mf-space) * 3); }
/* portal: files chosen for a message, with a way to take one out again. */
.mf-file-list { list-style: none; margin: 0 0 calc(var(--mf-space) * 2); padding: 0; display: flex; flex-wrap: wrap; gap: var(--mf-space); }
.mf-file-list li { display: flex; align-items: center; gap: calc(var(--mf-space) * 0.5); padding: 2px 4px 2px 12px; border: 1px solid var(--mf-rule); border-radius: 999px; font-size: 15px; }
/* portal: the files that came with a chat message, below its text. */
.mf-chat__files { display: block; margin-top: calc(var(--mf-space) * 0.5); font-size: 14px; color: var(--mf-muted); }

/* portal: the Büroplan. The 3D stage with labels on top, the chosen room beside it. Room
   colours are tokens (ROOM_TYPE_TOKENS in src/lib/office-map.ts); the 3D view reads the
   same ones. */
.mf-office-map__bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: calc(var(--mf-space) * 1) calc(var(--mf-space) * 3);
  margin-bottom: calc(var(--mf-space) * 2);
}
.mf-office-map__bar .mf-field { flex: 1 1 320px; margin-bottom: 0; }
.mf-office-map__floors { display: flex; flex-wrap: wrap; gap: var(--mf-space); padding-bottom: calc(var(--mf-space) * 3.5); }
.mf-office-map__search { position: relative; }
.mf-office-map__suggestions {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
  list-style: none; margin: 0; padding: 4px 0; max-height: 320px; overflow-y: auto;
  background: var(--mf-white); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius);
}
.mf-office-map__suggestion { display: flex; justify-content: space-between; gap: calc(var(--mf-space) * 2); padding: 8px 12px; cursor: pointer; font-size: 16px; }
.mf-office-map__suggestion[aria-selected="true"], .mf-office-map__suggestion:hover { background: var(--mf-crimson-wash); }
.mf-office-map__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: calc(var(--mf-space) * 3); align-items: start; }
.mf-office-map__stage {
  position: relative; height: min(72vh, 680px); min-height: 420px;
  background: var(--mf-paper); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius); overflow: hidden;
}
.mf-office-map__canvas { position: absolute; inset: 0; touch-action: none; }
.mf-office-map__canvas canvas { display: block; }
.mf-office-map__canvas--pointer { cursor: pointer; }
.mf-office-map__labels { position: absolute; inset: 0; pointer-events: none; }
.mf-office-map__hint { margin: var(--mf-space) 0 0; font-size: 14px; }
.mf-office-map__loading { margin: 0; padding: calc(var(--mf-space) * 2); }
.mf-office-map__label {
  display: flex; flex-direction: column; align-items: center; padding: 2px 6px; max-width: 150px;
  background: var(--mf-white); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius);
  font-size: 12px; line-height: 1.3; color: var(--mf-ink); text-align: center; white-space: nowrap;
}
.mf-office-map__label strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.mf-office-map__label-names { display: flex; flex-direction: column; }
.mf-office-map__label-names span { overflow: hidden; text-overflow: ellipsis; }
.mf-office-map__label--quiet { color: var(--mf-muted); }
.mf-office-map__label--selected { border-color: var(--mf-crimson); color: var(--mf-crimson); }
.mf-office-map__labels--compact .mf-office-map__label { padding: 0 4px; font-size: 11px; }
.mf-office-map__labels--compact .mf-office-map__label-names { display: none; }
.mf-office-map__labels--compact .mf-office-map__label--quiet { display: none; }
.mf-office-map__floor-label {
  padding: 2px 8px; background: var(--mf-white); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius);
  font-family: var(--mf-display); font-size: 15px; color: var(--mf-crimson);
}
.mf-office-map__floor-label--active { border-color: var(--mf-crimson); }
.mf-office-map__panel { padding: calc(var(--mf-space) * 2); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius); background: var(--mf-white); }
.mf-office-map__panel-meta { margin: 0; font-size: 14px; color: var(--mf-muted); }
.mf-office-map__panel-title { margin: 2px 0 calc(var(--mf-space) * 1.5); font-size: 26px; font-variant-numeric: tabular-nums; }
.mf-office-map__people { list-style: none; margin: 0 0 calc(var(--mf-space) * 2); padding: 0; }
.mf-office-map__people li { display: flex; flex-direction: column; padding: 6px 0; border-top: 1px solid var(--mf-rule); font-size: 16px; }
.mf-office-map__people .mf-note { font-size: 14px; }
.mf-office-map__legend { margin-top: calc(var(--mf-space) * 2); font-size: 14px; }
.mf-office-map__swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--mf-rule); }
.mf-office-map__swatch--office { background: var(--mf-crimson-wash); }
.mf-office-map__swatch--meeting { background: var(--mf-crimson-light); }
.mf-office-map__swatch--kitchen { background: var(--mf-warn); }
.mf-office-map__swatch--wc { background: var(--mf-ok); }
.mf-office-map__swatch--stairs { background: var(--mf-ink); }
.mf-office-map__swatch--elevator { background: var(--mf-muted); }
.mf-office-map__swatch--other { background: var(--mf-rule); }
/* portal: a person's company as a coloured dot before the name (Büroplan). */
.mf-company-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.mf-company-dot--mayfair { background: var(--mf-crimson); }
.mf-company-dot--gator { background: var(--mf-gator); }
.mf-company-dot--maryland { background: var(--mf-maryland); }
.mf-office-map__label-names .mf-company-dot { width: 7px; height: 7px; margin-right: 4px; }
.mf-office-map .mf-disclosure { margin-top: calc(var(--mf-space) * 3); }
.mf-office-map__list-title { font-size: 18px; margin: calc(var(--mf-space) * 2) 0 var(--mf-space); }
.mf-office-map__list { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.mf-office-map__list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--mf-space); padding: 4px 0; border-top: 1px solid var(--mf-rule); }
.mf-office-map__list-room {
  justify-self: start; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-variant-numeric: tabular-nums; color: var(--mf-crimson-light);
}
.mf-office-map__list-room:hover { text-decoration: underline; }

/* portal: the Organigramm built in the portal. Units as boxes, sub-units in a grid below
   them, hung from a line; "brand" units in the company's colour (--mf-org-accent). */
.mf-org { --mf-org-accent: var(--mf-crimson); }
.mf-org--gator { --mf-org-accent: var(--mf-gator); }
.mf-org--maryland { --mf-org-accent: var(--mf-maryland); }
.mf-org-view__tabs { display: flex; flex-wrap: wrap; gap: var(--mf-space); margin-bottom: calc(var(--mf-space) * 3); }
.mf-org-view__heading { font-size: 26px; margin-bottom: calc(var(--mf-space) * 2); hyphens: auto; overflow-wrap: break-word; }
.mf-org-view__foot { margin-top: calc(var(--mf-space) * 2); }
.mf-org__level {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: calc(var(--mf-space) * 1.5);
}
.mf-org__level--single { grid-template-columns: minmax(0, 1fr); }
.mf-org__branch { min-width: 0; }
.mf-org__branch > .mf-org__level {
  position: relative; margin-top: calc(var(--mf-space) * 2); padding-top: calc(var(--mf-space) * 2);
  border-top: 2px solid var(--mf-rule);
}
.mf-org__branch > .mf-org__level::before {
  content: ""; position: absolute; left: 50%; top: calc(var(--mf-space) * -2 - 2px);
  height: calc(var(--mf-space) * 2); border-left: 2px solid var(--mf-rule);
}
.mf-org__level--single > .mf-org__branch > .mf-org__unit { max-width: 640px; margin: 0 auto; }
/* One sub-unit hangs straight below its unit: a short vertical line, no crossbar. */
.mf-org__branch > .mf-org__level--single { border-top: 0; padding-top: 0; }
.mf-org__branch > .mf-org__level--single::before { top: calc(var(--mf-space) * -2); }
.mf-org__unit { border: 1px solid var(--mf-rule); border-radius: var(--mf-radius); background: var(--mf-paper); padding: calc(var(--mf-space) * 1.25) calc(var(--mf-space) * 1.5); }
.mf-org__unit--brand { background: var(--mf-org-accent); border-color: var(--mf-org-accent); color: var(--mf-white); }
.mf-org__unit--muted { background: var(--mf-rule); }
.mf-org__title { font-family: var(--mf-body); font-size: 16px; font-weight: 700; margin: 0; color: inherit; text-align: center; hyphens: auto; overflow-wrap: break-word; }
.mf-org__unit--plain .mf-org__title, .mf-org__unit--muted .mf-org__title { color: var(--mf-ink); }
.mf-org__people {
  list-style: none; margin: var(--mf-space) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--mf-space) * 0.75);
}
.mf-org__person {
  display: flex; flex-direction: column; align-items: center; min-width: 130px; flex: 1 1 130px; max-width: 240px;
  padding: 4px 8px; background: var(--mf-white); border-radius: var(--mf-radius); color: var(--mf-ink);
  font-size: 15px; line-height: 1.3; text-align: center;
}
.mf-org__person-name { overflow-wrap: anywhere; }
.mf-org__person-name--link { color: var(--mf-ink); text-decoration: underline dotted var(--mf-muted); text-underline-offset: 3px; }
.mf-org__person-name--link:hover { color: var(--mf-crimson-light); }
.mf-org__person-note { font-size: 13px; color: var(--mf-muted); font-style: italic; }
.mf-org__items { margin: var(--mf-space) 0 0; padding-left: 18px; font-size: 15px; color: var(--mf-ink); }
.mf-org__unit--brand .mf-org__items { color: var(--mf-white); }
/* portal: the admin's outline of an org chart, indented by level, and one person in its form. */
.mf-org-outline { list-style: none; margin: 0; padding: 0; }
.mf-org-outline__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--mf-space) calc(var(--mf-space) * 2);
  padding: 8px 0; border-top: 1px solid var(--mf-rule);
}
.mf-org-outline__row:first-child { border-top: 0; }
.mf-org-outline__row--depth-1 { padding-left: 20px; }
.mf-org-outline__row--depth-2 { padding-left: 40px; }
.mf-org-outline__row--depth-3 { padding-left: 60px; }
.mf-org-outline__row--depth-4 { padding-left: 80px; }
.mf-org-outline__row--depth-5, .mf-org-outline__row--depth-6 { padding-left: 100px; }
.mf-org-outline__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--mf-space); min-width: 0; }
.mf-org-person-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto; gap: var(--mf-space) calc(var(--mf-space) * 1.5); align-items: end; }
.mf-org-person-row .mf-field { margin-bottom: var(--mf-space); }
.mf-org-person-row .mf-row-actions { padding-bottom: calc(var(--mf-space) * 1.5); }

/* portal: the Mail-Agent (KI Suite). The instructions the assistant suggests, the device code
   to type at Microsoft, a card of the assistant inside its answer, and the steps while the
   agent is created. */
.mf-instructions {
  margin: 0 0 var(--mf-space); padding: calc(var(--mf-space) * 2);
  background: var(--mf-paper); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius);
  font-family: var(--mf-mono); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.mf-device-code { font-family: var(--mf-mono); font-size: 24px; letter-spacing: 0.1em; color: var(--mf-crimson); }
.mf-agent-card { margin-top: calc(var(--mf-space) * 2); padding-top: calc(var(--mf-space) * 2); border-top: 1px solid var(--mf-rule); }
.mf-agent-card p { margin: 0 0 var(--mf-space); }
/* rails: a button the page only shows when it applies ("Gespeicherte Einstellungen verwenden");
   .mf-button sets display, which would otherwise win over [hidden]. */
.mf-button[hidden] { display: none; }
.mf-steps { list-style: none; margin: 0 0 calc(var(--mf-space) * 2); padding: 0; }
.mf-steps li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--mf-space); padding: var(--mf-space) 0; border-top: 1px solid var(--mf-rule); }
.mf-steps li:first-child { border-top: 0; }
.mf-steps__info { flex-basis: 100%; font-size: 15px; color: var(--mf-muted); overflow-wrap: anywhere; }
/* portal: the KI Suite dashboard. Every agent as a large tile (a button): the most important
   facts at first, a click opens the details below the grid. Hover only lifts the tile a little,
   as touch screens and Teams have no hover. */
.mf-agent-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: calc(var(--mf-space) * 3); margin: calc(var(--mf-space) * 3) 0;
}
.mf-agent-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--mf-space);
  min-height: 200px; padding: calc(var(--mf-space) * 3);
  background: var(--mf-white); border: 1px solid var(--mf-rule); border-radius: calc(var(--mf-radius) * 2);
  font: inherit; color: var(--mf-ink); text-align: left; cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mf-agent-tile:hover { border-color: var(--mf-crimson-light); transform: translateY(-2px); }
.mf-agent-tile:focus-visible { outline: 2px solid var(--mf-crimson-light); outline-offset: 2px; }
.mf-agent-tile[aria-expanded="true"] { border-color: var(--mf-crimson); background: var(--mf-crimson-wash); }
.mf-agent-tile .mf-card__eyebrow { margin: 0; }
.mf-agent-tile__name { font-family: var(--mf-display); font-size: 22px; line-height: 1.2; color: var(--mf-crimson); overflow-wrap: anywhere; }
.mf-agent-tile__facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mf-space); }
.mf-agent-tile__preview { font-family: var(--mf-mono); font-size: 14px; color: var(--mf-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.mf-agent-tile__more { margin-top: auto; font-size: 15px; color: var(--mf-crimson-light); }
@media (prefers-reduced-motion: reduce) {
  .mf-agent-tile { transition: none; }
  .mf-agent-tile:hover { transform: none; }
}

/* portal: before and after of the Mail-Agent's rules. Added lines in the "ok" colour, removed
   ones in the "error" colour and struck through; the word in front says it without colour too. */
.mf-diff { margin: 0 0 calc(var(--mf-space) * 2); border: 1px solid var(--mf-rule); border-radius: var(--mf-radius); font-family: var(--mf-mono); font-size: 15px; }
.mf-diff__line { margin: 0; padding: 2px calc(var(--mf-space) * 1.5); white-space: pre-wrap; overflow-wrap: anywhere; border-left: 4px solid transparent; }
.mf-diff__line--same { color: var(--mf-muted); }
.mf-diff__line--added { color: var(--mf-ok); border-left-color: var(--mf-ok); background: var(--mf-paper); }
.mf-diff__line--removed { color: var(--mf-error); border-left-color: var(--mf-error); text-decoration: line-through; }
.mf-diff__mark { display: inline-block; margin-right: var(--mf-space); font-family: var(--mf-body); font-size: 13px; font-weight: 600; text-decoration: none; }

@media (max-width: 960px) {
  .mf-split { grid-template-columns: minmax(0, 1fr); }
  .mf-split__side { position: static; }
  .mf-office-map__body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .mf-org-person-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mf-org-outline__row--depth-2, .mf-org-outline__row--depth-3, .mf-org-outline__row--depth-4,
  .mf-org-outline__row--depth-5, .mf-org-outline__row--depth-6 { padding-left: 32px; }
  .mf-office-map__stage { height: 62vh; min-height: 360px; }
  .mf-office-map__floors { padding-bottom: 0; }
  .mf-auth__mark .mf-logo { height: 96px; }
  .mf-auth { min-height: calc(100vh - 180px); }
  h1 { font-size: 32px; }
  .mf-main { padding: calc(var(--mf-space) * 4) calc(var(--mf-space) * 2.5); }
  /* portal: on phones the sidebar is a bar at the top; "Menü" opens the navigation below it. */
  .mf-shell:has(> .mf-sidebar) { display: flex; flex-direction: column; }
  .mf-sidebar {
    position: static; height: auto; overflow: visible; gap: calc(var(--mf-space) * 2);
    padding: calc(var(--mf-space) * 1.5) calc(var(--mf-space) * 2.5);
    border-right: 0; border-bottom: 1px solid var(--mf-rule);
  }
  .mf-sidebar .mf-logo { height: 40px; }
  .mf-sidebar .mf-sidebar__toggle { display: inline-flex; }
  .mf-sidebar:not(.mf-sidebar--open) .mf-sidebar__nav,
  .mf-sidebar:not(.mf-sidebar--open) .mf-user { display: none; }
  /* portal: key figures two by two on phones, not one below the other. */
  .mf-stat { column-gap: calc(var(--mf-space) * 3); }
  .mf-stat__item { min-width: 120px; flex: 1 1 120px; }
}
