/* mf-vertrieb — Brand-Tokens (mf-brain design/brand-tokens.md): indigo primär, steel sekundär,
   yellow NUR Akzent (nie Text auf Weiß), platinum Flächen. Fluid, mobile-first, keine festen Breiten. */
:root {
  --indigo: #153B50; --steel: #4A6D7C; --yellow: #FFC40C; --platinum: #EAEAEA; --ink: #1D1D1B; --white: #fff;
  --bg: #F6F7F8; --line: #DADEE1; --muted: #5F6B73; --ok: #1F7A4D; --warn: #B4540A;
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px;
  --font: "Montserrat", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --touch: 44px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--indigo); font: 400 16px/1.5 var(--font); }
a { color: var(--steel); }
h1, h2, h3 { margin: 0; }
.h1 { font-size: clamp(22px, 2.2vw + 14px, 32px); font-weight: 700; line-height: 1.1; }
.h1 .date { font-weight: 300; color: var(--muted); font-size: 0.7em; margin-left: .3em; }
.h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--steel); margin-bottom: 10px; }
.count { display: inline-block; min-width: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--platinum); color: var(--indigo); font-size: 12px; text-align: center; margin-left: .4em; }
.small { font-size: 13px; } .muted { color: var(--muted); } .label { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--steel); font-weight: 600; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)); background: var(--white); border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; min-height: var(--touch); }
.logo { display: block; height: 30px; width: auto; }
.logo.big { height: 48px; }
.brand .sub { font-weight: 300; color: var(--steel); font-size: 17px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 10px; min-height: var(--touch); display: inline-flex; align-items: center; text-decoration: none; color: var(--indigo); border-radius: var(--r-sm); font-weight: 600; font-size: 14px; }
.nav a.on { background: var(--platinum); }
.nav .who { padding: 0 8px; color: var(--muted); font-size: 14px; }

/* Layout */
.wrap { width: min(100% - 32px, 1080px); margin: 16px auto 64px; }
.wrap.narrow { max-width: 420px; margin-top: 12vh; }
.cols { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
@media (min-width: 1600px) { .wrap { width: min(100% - 64px, 1280px); } body { font-size: 17px; } }
.col { display: grid; gap: 16px; align-content: start; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-bottom: 16px; }
.col .card { margin-bottom: 0; }
.card.center { text-align: center; display: grid; gap: 12px; justify-items: center; }
details.card > summary { cursor: pointer; list-style: none; } details.card > summary::-webkit-details-marker { display: none; }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list .row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list .row:first-child { border-top: 0; }
.list .row.done { opacity: .6; }
.grow { flex: 1 1 auto; min-width: 0; }
.link { text-decoration: none; color: inherit; display: block; }
.name { font-weight: 600; overflow-wrap: anywhere; }
.rank { display: inline-block; min-width: 1.6em; color: var(--steel); font-weight: 700; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.plain { margin: 0; padding-left: 0; list-style: none; } .plain li { padding: 4px 0; }
.notes li { border-top: 1px solid var(--line); padding: 8px 0; white-space: pre-line; } .notes li:first-child { border-top: 0; }
.late { color: var(--warn); font-weight: 700; }
.empty { color: var(--muted); margin: 8px 0 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; } .kv dd { margin: 0; }

/* Chips */
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--platinum); color: var(--indigo); font-size: 12px; font-weight: 600; margin: 2px 4px 0 0; max-width: 100%; overflow-wrap: anywhere; }
.todo .small { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.chip-warn { background: #FFF1CC; border: 1px solid var(--yellow); }
.chip-carry { background: #E6EEF2; color: var(--steel); }
.chip-stage { background: var(--indigo); color: var(--white); }

/* Buttons — Touch-Ziele ≥ 44 px */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--touch); padding: 8px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--steel); background: var(--white); color: var(--indigo); font: 600 15px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--platinum); }
.btn.primary { background: var(--indigo); color: var(--white); border-color: var(--indigo); }
.btn.primary:hover { background: #0F2C3C; }
.btn.call { border-color: var(--indigo); box-shadow: inset 0 -3px 0 var(--yellow); }
.btn.big { width: 100%; min-height: 52px; font-size: 17px; }
.btn.on { outline: 3px solid var(--yellow); outline-offset: 1px; }
.outcome-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 480px) { .outcome-btns { grid-template-columns: repeat(4, 1fr); } }
.outcome-btns .btn { white-space: normal; text-align: center; }

/* Kontext-Blöcke, Stichpunkte */
.block { padding: 10px 0; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; padding-top: 0; }
.block .label { margin-bottom: 4px; }
.summary { margin: 0; font-size: 16px; }
.bullets { margin: 0; padding-left: 1.1em; } .bullets li { padding: 2px 0; }
.bullets.small { font-size: 13px; margin-top: 6px; }
/* Mail-Entwurf: Absätze bleiben erhalten, lange Wörter brechen um, nichts läuft seitlich aus der Karte. */
.mailtext { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 12px;
  padding: 10px 12px; border-radius: 8px; background: var(--platinum); color: var(--ink); max-width: 100%; }
.list.compact .row { padding: 6px 0; }

/* Formulare */
.panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.panel[hidden] { display: none; }  /* .panel{display:grid} darf das hidden-Attribut nicht überstimmen */
.steps { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.steps .label { width: 100%; }
.chip-radio { display: inline-flex; }
.chip-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-radio span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--steel); font-weight: 600; font-size: 14px; color: var(--indigo); cursor: pointer; }
.chip-radio input:checked + span { background: var(--indigo); color: var(--white); border-color: var(--indigo); box-shadow: inset 0 -3px 0 var(--yellow); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--steel); outline-offset: 2px; }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--steel); }
label.radio { grid-template-columns: auto 1fr; align-items: center; gap: 8px; font-weight: 500; color: var(--indigo); min-height: 36px; }
input, select, textarea { font: 400 16px var(--font); color: var(--indigo); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; min-height: var(--touch); background: var(--white); width: 100%; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--steel); outline-offset: 1px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; margin: 0; }
legend { font-size: 13px; font-weight: 600; color: var(--steel); text-transform: uppercase; letter-spacing: .1em; padding: 0 4px; }
.grid2 { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.checklist summary { cursor: pointer; font-weight: 600; color: var(--steel); min-height: 36px; display: flex; align-items: center; }
.checklist .grid2 { margin-top: 8px; }
.search { display: flex; gap: 8px; margin-top: 8px; }
.search input { flex: 1; }
.back { display: inline-block; margin-bottom: 10px; text-decoration: none; font-weight: 600; min-height: 36px; }

/* Firma */
.firma-head { display: grid; gap: 8px; margin-bottom: 16px; }
.firma-head .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.ref { padding: 10px 12px; border-left: 4px solid var(--yellow); background: #FBFBFB; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: 12px; }
.score .bar { height: 8px; background: var(--platinum); border-radius: 999px; overflow: hidden; margin: 6px 0 10px; }
.score .bar span { display: block; height: 100%; background: var(--steel); }
.crit { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.crit li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 56px; gap: 8px; align-items: center; font-size: 13px; }
.crit .k { color: var(--muted); } .crit .v { overflow-wrap: anywhere; }
.conf { height: 6px; background: var(--platinum); border-radius: 999px; overflow: hidden; } .conf i { display: block; height: 100%; background: var(--indigo); }

.report { margin: 0; white-space: pre-wrap; font: 400 14px/1.55 var(--font); overflow-x: auto; }

/* Banner */
.banner { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 16px; }
.banner.ok { background: #E4F3EA; color: var(--ok); border: 1px solid #BFE3CC; }
.banner.warn { background: #FFF1CC; color: var(--warn); border: 1px solid var(--yellow); }

/* Große Desktops: nichts skaliert hoch, die Inhaltsbreite ist gedeckelt; kein horizontales Scrollen */
html, body { overflow-x: hidden; }
img, svg { max-width: 100%; }
