/* CEOPRENEUR Deals — one stylesheet for both the public site and the private app.
 *
 * Übernommen aus dem Entwurf in docs/design/deals.dc.html, 07.09.2026. Kein
 * Template wurde dafür geändert: die Klassennamen sind dieselben geblieben, nur
 * ihre Werte sind neu. Was der Entwurf zeigte und was hier bewusst abweicht,
 * steht in docs/design/README.md.
 *
 * Diese Datei ist laut docs/conventions.md §1 die einzige Quelle für Farbe,
 * Radius, Breite und Schrift. Kein Hex-Wert und keine Schriftfamilie gehört in
 * ein Template.
 */

:root {
  /* Grundflächen. Der warme Grund trägt die Seite, Weiss ist die erhobene
     Fläche darauf — nicht umgekehrt. */
  --canvas: #eceae5;
  --paper: #ffffff;
  --paper-warm: #f4f2ee;

  /* Text. Drei Stufen, keine vierte: die vierte wäre die, die niemand mehr
     lesen kann. --ink-faint liegt deshalb auf demselben Wert wie --ink-soft
     minus einer Nuance und bleibt über 4.5:1 auf beiden Grundflächen. */
  --ink: #1a1208;
  --ink-soft: #4a4437;
  --ink-faint: #6b6357;

  --line: #e2e0da;
  --hair: #f4f2ee;

  /* Gold trägt Linien, Marken und Ränder — niemals kleinen Text auf hellem
     Grund: #c8a96e auf --canvas ergibt 1.87:1, WCAG AA verlangt 4.5:1.
     --gold-ink ist dieselbe Farbfamilie, dunkel genug zum Lesen. */
  --gold: #c8a96e;
  --gold-ink: #7d5f26;

  /* Die Hauptaktion ist Tinte, nicht Farbe. */
  --accent: #1a1208;
  --accent-soft: #efe9dc;

  /* Zustandsfarben. Der Entwurf ist monochrom, die interne Pipeline ist es
     nicht: dort trägt Farbe eine Bedeutung (freigegeben, offen, abgelehnt) und
     ist keine Dekoration. Also behalten, aber auf den warmen Grund gestimmt. */
  --ok: #2f5d3a;
  --ok-soft: #e6ede4;
  --warn: #7d5f26;
  --warn-soft: #f3ecdc;
  --danger: #8c2f22;
  --danger-soft: #f7e7e3;

  --radius: 0;
  --wrap: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Die Bedienfläche eines Fingers. Auf dem Desktop zielt eine Maus und 30 px
     genügen; darunter gilt 44 px. Siehe .tap-Regeln weiter unten. */
  --tap: 30px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- navigation ---------- */

.nav { border-bottom: 2px solid var(--gold); background: var(--paper); }
.navinner { display: flex; align-items: stretch; justify-content: space-between; gap: 24px; min-height: 64px; flex-wrap: wrap; }
/* Umbrechen dürfen: Zeichen, Name, Produktname und intern-Kennzeichen messen
   zusammen 338 px und passen damit bei 320 px Fensterbreite nicht in eine
   Zeile. Die Wörter selbst bleiben ganz (white-space: nowrap weiter unten). */
/* Der Hausstil der Schwesterprodukte: CEO in Gold, PRENEUR in Tinte, eng
   gesetzt statt gesperrt; dahinter ein senkrechter goldener Strich und der
   Produktname in normaler Stärke und gemischter Schreibung. Kein Zeichen davor.
   Umbrechen darf die Zeile weiterhin, damit sie bei 320 px passt; die Wörter
   selbst bleiben ganz. */
.brand {
  display: inline-flex; align-items: center; gap: 0; row-gap: 4px;
  flex-wrap: wrap; min-height: var(--tap);
  text-decoration: none; color: var(--ink);
}
.brandname {
  font-weight: 800; letter-spacing: 0.005em; text-transform: uppercase;
  font-size: 1.0625rem; line-height: 1.35; white-space: nowrap;
}
/* Gold auf Papier misst 2.24:1 und trüge deshalb sonst keinen Text (siehe
   --gold-ink). Hier ist es zulässig und bleibt es: WCAG 2.2 nimmt unter 1.4.3
   „text that is part of a logo or brand name" ausdrücklich aus. Die Ausnahme
   gilt für die Wortmarke — und für nichts sonst. */
.brand-ceo { color: var(--gold); }
.brand-preneur { color: var(--ink); }
.brandthin {
  font-weight: 500; letter-spacing: 0; color: var(--ink-soft);
  font-size: 1.0625rem; line-height: 1.35; white-space: nowrap;
  margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--gold);
}
.tag {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;
  background: var(--accent); color: var(--paper); padding: 3px 7px; margin-left: 8px;
}
.navlinks { display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; }
.navlinks form, .navlinks .inline { display: flex; align-items: stretch; margin: 0; }
.navlinks a, .linkbutton {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px;
  color: var(--ink-faint); text-decoration: none; font-size: 0.88rem; font-weight: 600;
  border-bottom: 2px solid transparent;
}
.navlinks a:hover, .linkbutton:hover { color: var(--ink); border-bottom-color: var(--gold); }
.linkbutton { background: none; border-width: 0 0 2px; border-style: solid; border-color: transparent; font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }

main.wrap { padding-top: 56px; padding-bottom: 88px; }

/* ---------- typography ---------- */

/* clamp() statt einer festen Grösse: 52 px sind breiter als jede Telefonspalte
   — „Treuhandmarkt" allein misst dabei 371 px. Die Untergrenze greift ab
   ~520 px Fensterbreite nach unten, darüber bleibt es bei 52 px. */
h1 {
  font-size: clamp(1.75rem, 10vw, 3.25rem); line-height: 1.05; margin: 0 0 20px;
  font-weight: 700; letter-spacing: -0.03em; overflow-wrap: break-word; text-wrap: pretty;
}
h2 { font-size: clamp(1.375rem, 3.2vw, 1.875rem); margin: 52px 0 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 1.25rem; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0 0 14px; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem;
  color: var(--gold-ink); font-weight: 600; margin-bottom: 16px;
}
.lead { font-size: 1.06rem; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; text-wrap: pretty; }
.muted { color: var(--ink-faint); }
.hint { font-size: 0.88rem; color: var(--ink-faint); margin-top: 6px; }
.fineprint { font-size: 0.82rem; color: var(--ink-faint); margin-top: 16px; max-width: 60ch; }
.empty { color: var(--ink-faint); padding: 44px 0; font-size: 1rem; text-align: center; background: var(--paper); }

/* ---------- hero & sections ---------- */

.hero { padding: 32px 0 52px; }
.hero h1 { max-width: 22ch; }
.hero.narrow { max-width: 720px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* min() an jeder Mindestbreite: eine feste Spur von 300 px passt bei 320 px
   Fensterbreite nicht mehr neben den Seitenrand und schiebt die Seite
   waagerecht auf. Oberhalb der Schwelle rechnet es identisch. */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; margin: 36px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; margin: 36px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }

.card { border: 0; border-radius: var(--radius); padding: 30px 32px; background: var(--paper); }
.card header { margin-bottom: 14px; }
.card header::before { content: ''; display: block; width: 28px; height: 2px; background: var(--gold); margin-bottom: 18px; }
.card p:last-child { margin-bottom: 0; }

.note { background: var(--paper); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 30px 32px; margin: 40px 0; }
.callout { background: var(--accent); color: var(--paper); border-radius: var(--radius); padding: 44px 48px; margin: 48px 0; }
.callout h2 { margin-top: 0; color: var(--paper); }
.callout p { color: var(--paper); max-width: 76ch; }
.callout a { color: var(--paper); text-decoration-color: var(--gold); }
.callout .btn { background: transparent; color: var(--paper); border-color: var(--paper); }
.callout .btn:hover { background: rgba(255, 255, 255, 0.1); }
.notice { background: var(--warn-soft); border-left: 3px solid var(--gold); padding: 14px 18px; border-radius: var(--radius); font-size: 0.94rem; }

.arrow {
  display: inline-flex; align-items: center; min-height: var(--tap);
  margin-top: 14px; text-decoration: none; font-weight: 600; font-size: 0.94rem;
  border-bottom: 1px solid var(--gold);
}
.arrow::after { content: ' →'; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 10px; }
.ticks li::before { content: '—'; position: absolute; left: 0; color: var(--gold-ink); font-weight: 700; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 0; background: var(--paper); }
/* Trennlinien gehören an die Zelle, nicht als Lücke auf einen farbigen
   Container: eine unvollständige letzte Zeile zeigte sonst den Container. */
.steps li { counter-increment: step; background: var(--paper); padding: 26px 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); display: block; font-size: 0.78rem; color: var(--gold-ink); font-weight: 700; margin-bottom: 10px; }
.steps strong { display: block; font-size: 1rem; }
.steps span { color: var(--ink-soft); font-size: 0.88rem; }

.pagehead { margin-bottom: 40px; }

/* ---------- facts / definition lists ---------- */

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; margin: 20px 0; }
.facts.wide { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-weight: 600; }
.facts dd { margin: 4px 0 0; font-size: 0.94rem; font-variant-numeric: tabular-nums; }

/* Zehn von elf Käuferprofilen im Seed sind RESEARCH_ONLY. Dieser Hinweis ist
   damit der Normalfall auf einer Mandatskarte und keine Ausnahme — er darf
   nicht wie eine Warnung aussehen, aber auch nicht zu übersehen sein. */
.badge-research {
  font-size: 0.82rem; background: var(--hair); border-left: 3px solid var(--gold);
  color: var(--ink-soft); padding: 12px 16px; border-radius: var(--radius);
  display: block; max-width: 62ch;
}

/* ---------- buttons & forms ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: var(--radius); text-decoration: none;
  font-weight: 600; font-size: 0.88rem; border: 1px solid var(--ink); cursor: pointer;
  background: var(--paper); color: var(--ink); font-family: inherit; line-height: 1.4;
}
.btn:hover { background: var(--paper-warm); }
.btn-primary { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn-primary:hover { background: #362818; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-warm); }
.btn-small { min-height: var(--tap); padding: 0 13px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.form { max-width: 720px; }
.formsection { margin-top: 52px; padding-top: 40px; border-top: 2px solid var(--gold); }
.field { margin-bottom: 22px; }
.field label, .field .label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; margin-bottom: 8px; color: var(--ink-faint); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=password], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 0.94rem; background: var(--paper); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold-ink); outline-offset: 0; border-color: var(--gold-ink); }
textarea { resize: vertical; min-height: 120px; }
.checkgrid { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checkline { display: inline-flex; align-items: center; min-height: var(--tap); gap: 8px; font-size: 0.9rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink); }
.checkline input { width: auto; min-height: 0; }
.inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 10px 8px 0; }
.inline input, .inline select { width: auto; min-width: 180px; }

.flash { padding: 14px 18px; border-radius: var(--radius); margin: 24px 0 0; font-size: 0.94rem; border-left: 3px solid; }
.flash-ok { background: var(--ok-soft); color: var(--ok); border-left-color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-left-color: var(--danger); }

.loginbox { max-width: 430px; margin: 72px auto; background: var(--paper); padding: 36px 34px; }

details.creator { margin-top: 32px; border: 0; border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 22px 26px; background: var(--paper); }
details.creator summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
details.creator .form { margin-top: 24px; }

/* ---------- tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: 0.94rem; margin: 20px 0; background: var(--paper); }
.table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); border-bottom: 1px solid var(--line); padding: 14px 16px; font-weight: 600; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.table.compact { font-size: 0.88rem; }
.table.compact td, .table.compact th { padding: 10px 14px; }
/* Ein Firmenname in einer Tabellenzelle ist der Weg in den Datensatz, nicht
   ein Wort im Fliesstext. Er braucht eine Fläche wie jedes andere Bedienelement. */
.table td a, .stage li a, .evaluations a { display: inline-flex; align-items: center; min-height: var(--tap); }
.table td.ok { color: var(--ok); font-weight: 600; }
.table td.todo { color: var(--ink-faint); }

/* Eine Tabelle mit sechs Spalten passt auf 320 px nicht, und sie soll es auch
   nicht: die Spalten so weit zu quetschen, bis jede Zelle eine Buchstabensäule
   ist, macht sie unlesbar. Also scrollt die Tabelle in sich selbst.
   `display: block` genügt dafür — thead und tbody bleiben als Geschwister in
   einer anonymen Tabellenbox und fluchten weiter. Sie einzeln zu
   `display: table` zu erklären wäre der Fehler: dann rechnet jede Gruppe ihre
   Spaltenbreiten für sich, und nichts fluchtet mehr. */
.table { display: block; overflow-x: auto; }

/* ---------- private app ---------- */

body.admin { background: var(--canvas); }
body.admin .nav { background: var(--paper); }
body.admin main.wrap { margin-top: 0; margin-bottom: 0; padding: 56px 24px 88px; }

.whoami { font-size: 0.88rem; color: var(--ink-faint); margin-bottom: 32px; padding-bottom: 20px; border-bottom: 2px solid var(--gold); }
.rolechip { font-size: 0.75rem; letter-spacing: 0.14em; padding: 3px 8px; border-radius: var(--radius); background: var(--accent); color: var(--paper); font-weight: 600; margin-left: 6px; }
.role-analyst { background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }

.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 0; margin: 28px 0 12px; background: var(--paper); }
.stat { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; background: var(--paper); }
.statvalue { display: block; font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.statlabel { font-size: 0.75rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; display: block; margin-top: 12px; }

.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 0; background: var(--paper); }
.stage { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--paper); }
.stage header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.stage h3 { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 0; font-weight: 600; }
.stage .count { font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.stage ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.88rem; }
.stage li { padding: 6px 0; border-top: 1px solid var(--hair); }
.stage li a { text-decoration: none; }

.gatebox { border: 0; border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 26px 30px; margin: 32px 0; background: var(--paper); }
.gatebox h2 { margin-top: 0; font-size: 1.125rem; }
.gate-open { color: var(--ok); font-weight: 600; }
.gate-closed { color: var(--danger); font-weight: 600; background: var(--danger-soft); padding: 14px 18px; border-radius: var(--radius); display: block; }
.gatechecks { list-style: none; padding: 0; margin: 0 0 20px; }
.gatechecks li { padding: 10px 0 10px 28px; position: relative; font-size: 0.94rem; border-top: 1px solid var(--hair); }
.gatechecks li::before { position: absolute; left: 0; font-weight: 700; }
.gatechecks li.ok::before { content: '✓'; color: var(--ok); }
.gatechecks li.todo::before { content: '○'; color: var(--ink-faint); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chip { display: inline-block; font-size: 0.75rem; letter-spacing: 0.08em; font-weight: 600; padding: 3px 8px; border-radius: var(--radius); background: var(--paper-warm); color: var(--ink-soft); text-transform: uppercase; }
.chip-research_only, .chip-market_universe, .chip-unverified { background: var(--paper-warm); color: var(--ink-faint); }
.chip-high_fit, .chip-researched, .chip-in_qualification { background: var(--warn-soft); color: var(--warn); }
.chip-contact_approved, .chip-contacted, .chip-owner_signal { background: var(--accent-soft); color: var(--gold-ink); }
.chip-qualified, .chip-opportunity, .chip-matched, .chip-introduced, .chip-contact_confirmed, .chip-engaged { background: var(--ok-soft); color: var(--ok); }
.chip-disqualified, .chip-rejected, .chip-declined, .chip-withdrawn { background: var(--danger-soft); color: var(--danger); }

.verdict { display: inline-block; font-size: 0.75rem; letter-spacing: 0.06em; font-weight: 600; padding: 2px 7px; border-radius: var(--radius); margin-right: 6px; }
.v-match { background: var(--ok-soft); color: var(--ok); }
.v-partial { background: var(--warn-soft); color: var(--warn); }
.v-miss { background: var(--danger-soft); color: var(--danger); }
.v-unknown { background: var(--paper-warm); color: var(--ink-faint); }
.v-unconstrained { background: var(--paper-warm); color: var(--ink-soft); }

.eval header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.eval .score { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.evaluations { display: grid; gap: 20px; }
.notes { white-space: pre-wrap; background: var(--hair); padding: 16px 18px; border-radius: var(--radius); font-size: 0.94rem; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 44px 0 56px; font-size: 0.88rem; color: var(--ink-soft); background: var(--paper); }
.footer p { max-width: 70ch; }
.footer p:first-child { color: var(--ink); }

/* ---------- schmale Fenster ---------- */

@media (max-width: 680px) {
  /* 44 px, wo ein Daumen zielt. Die grossen Knöpfe sind es ohnehin; das hier
     gilt der Kopfzeile und den Textlinks. */
  .navlinks a, .linkbutton, .arrow, .btn-small, .brand, details.creator summary,
  .table td a, .stage li a, .evaluations a { min-height: 44px; }
  .navlinks { gap: 0; }
  .navlinks a, .linkbutton { padding: 0 10px; }
}

@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  main.wrap, body.admin main.wrap { padding-top: 36px; }
  .card, .note, .callout, .gatebox, .loginbox { padding-left: 20px; padding-right: 20px; }
}
