/* =========================================================
   Gründungsbegleitungssuite Susan
   Design-System: Warm Paper · Coaching · Family-tone
   PRO TEMPRE — Wolfram Löbnitz
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Warm paper palette */
  --paper:        #FBF7EE;
  --paper-deep:   #F3EBDA;
  --card:         #FFFFFF;
  --card-soft:    #FDFBF6;

  /* Brand */
  --green:        #73B630;
  --green-deep:   #5A8F25;
  --green-soft:   #E7F2D6;

  /* Earth accents */
  --terracotta:   #C26B4B;
  --terra-soft:   #F4DDD1;
  --amber:        #B08538;
  --amber-soft:   #F0E2C4;
  --forest:       #2D3A2A;

  /* Text */
  --ink:          #2D3A2A;
  --ink-soft:     #545454;
  --ink-mute:     #8A8580;
  --line:         #E4DCC9;
  --line-soft:    #EFE7D4;

  /* Risk traffic */
  --risk-low:     #73B630;
  --risk-med:     #E5A042;
  --risk-high:    #C8553D;
  --risk-crit:    #8B2C1F;

  /* Type */
  --serif: 'Fraunces', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  /* Layout */
  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    22px;
  --shadow-sm:    0 1px 2px rgba(45,58,42,.06);
  --shadow:       0 6px 24px -8px rgba(45,58,42,.18), 0 2px 6px rgba(45,58,42,.06);
  --shadow-lg:    0 20px 50px -15px rgba(45,58,42,.22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(at 12% 8%, rgba(115,182,48,.05) 0, transparent 45%),
    radial-gradient(at 88% 92%, rgba(194,107,75,.05) 0, transparent 45%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
strong { color: var(--ink); font-weight: 600; }

/* ===== Layout shell ===== */
.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 56px) 80px;
}

/* ===== Top bar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  display: grid; place-items: center;
  color: white;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.brand-sub { color: var(--ink-mute); font-size: .82rem; font-family: var(--sans); font-weight: 400; }

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  transition: all .2s;
  border: 1px solid transparent;
}
.nav a:hover { background: var(--card); border-color: var(--line); color: var(--ink); }
.nav a.active { background: var(--ink); color: var(--paper); }

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
  padding: 16px 0 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 18px;
  font-weight: 600;
}
.hero-tag::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--green-deep);
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--green-deep);
}
.hero-sub {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
}
.hero-meta {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-size: .9rem;
}
.hero-meta dl { margin: 0; display: grid; gap: 10px; }
.hero-meta dt { font-weight: 600; color: var(--ink); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.hero-meta dd { margin: 2px 0 0; color: var(--ink-soft); }

/* ===== Cards ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card.lg { padding: 36px; }
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: var(--card-soft); }
.card.accent {
  background: linear-gradient(135deg, var(--green-soft) 0%, var(--card-soft) 60%);
  border-color: var(--green-soft);
}

/* ===== Grid ===== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== Section ===== */
.section { margin: 56px 0 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; }
.section-head .kicker {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}

/* ===== Module tiles (hub) ===== */
.module-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: all .25s ease;
  min-height: 240px;
}
.module-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}
.module-tile .num {
  font-family: var(--serif);
  font-size: 3.6rem;
  font-weight: 400;
  color: var(--green-deep);
  line-height: 1;
  font-style: italic;
  opacity: .35;
  position: absolute;
  top: 18px; right: 22px;
}
.module-tile h3 {
  margin: 0;
  font-size: 1.45rem;
}
.module-tile p { margin: 0; font-size: .94rem; color: var(--ink-soft); }
.module-tile .cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--green-deep);
  font-size: .92rem;
}
.module-tile .cta::after {
  content: '→';
  transition: transform .2s;
}
.module-tile:hover .cta::after { transform: translateX(4px); }

/* ===== Geschäftsfeld cards ===== */
.field-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.field-card .field-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.field-card h3 { margin: 0; font-size: 1.15rem; }
.field-card .role-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.role-anker { background: var(--green-soft); color: var(--green-deep); }
.role-saeule { background: var(--amber-soft); color: var(--amber); }
.role-zubringer { background: var(--terra-soft); color: var(--terracotta); }
.role-fundament { background: #DDE6F0; color: #2C5077; }

.field-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: .82rem;
}
.field-meta div { color: var(--ink-mute); }
.field-meta strong { display: block; color: var(--ink); font-size: .95rem; margin-top: 2px; }

/* ===== Lists ===== */
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li {
  padding: 10px 0 10px 26px;
  position: relative;
  border-bottom: 1px solid var(--line-soft);
  font-size: .94rem;
}
.list-clean li:last-child { border-bottom: none; }
.list-clean li::before {
  content: '';
  position: absolute;
  left: 0; top: 18px;
  width: 14px; height: 1px;
  background: var(--green);
}

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li {
  padding: 8px 0 8px 30px;
  position: relative;
  font-size: .94rem;
}
.list-check li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 8px;
  color: var(--green-deep);
  font-weight: 700;
}

/* ===== Stats ===== */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0;
}
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.stat-label {
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.stat-value {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 4px;
  line-height: 1;
}
.stat-sub { font-size: .8rem; color: var(--ink-mute); margin-top: 6px; }

/* ===== Pull quote / callout ===== */
.callout {
  border-left: 3px solid var(--green);
  background: linear-gradient(90deg, var(--green-soft) 0%, transparent 80%);
  padding: 18px 24px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}
.callout.warn {
  border-color: var(--terracotta);
  background: linear-gradient(90deg, var(--terra-soft) 0%, transparent 80%);
}
.callout.amber {
  border-color: var(--amber);
  background: linear-gradient(90deg, var(--amber-soft) 0%, transparent 80%);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .92rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-green { background: var(--green-deep); border-color: var(--green-deep); }
.btn-green:hover { background: var(--ink); border-color: var(--ink); }

/* ===== Tables ===== */
table.clean {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
table.clean th {
  background: var(--paper-deep);
  text-align: left;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
table.clean td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  vertical-align: top;
}
table.clean tr:last-child td { border-bottom: none; }
table.clean tr:hover td { background: var(--paper); }

/* ===== Risk matrix specific ===== */
.matrix-wrap {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0;
  margin: 28px 0;
}
.matrix-y-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 50px 0 30px;
}
.matrix-body {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 88px);
  gap: 6px;
  position: relative;
}
.matrix-cell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.matrix-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .18;
  pointer-events: none;
}
.matrix-cell.r-low::before    { background: var(--risk-low); }
.matrix-cell.r-med::before    { background: var(--risk-med); }
.matrix-cell.r-high::before   { background: var(--risk-high); }
.matrix-cell.r-crit::before   { background: var(--risk-crit); }

.matrix-x-axis {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  font-size: .75rem;
  text-align: center;
  color: var(--ink-mute);
  font-weight: 600;
  padding-top: 10px;
}
.matrix-x-label {
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 12px;
  grid-column: 2;
}

.risk-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  transition: transform .15s;
  border: 2px solid white;
}
.risk-dot:hover { transform: scale(1.18); z-index: 3; }
.risk-dot.cat-legal { background: #4A4A8A; }
.risk-dot.cat-finanz { background: #C26B4B; }
.risk-dot.cat-markt { background: #2C5077; }
.risk-dot.cat-person { background: #8B4A2B; }
.risk-dot.cat-prozess { background: #5A8F25; }

/* ===== Timeline / Roadmap ===== */
.phases {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}
.phase {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.phase.p2 { border-left-color: var(--amber); }
.phase.p3 { border-left-color: var(--terracotta); }
.phase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.phase-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--green-deep);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.p2 .phase-num { color: var(--amber); }
.p3 .phase-num { color: var(--terracotta); }
.phase-period {
  font-size: .82rem;
  color: var(--ink-mute);
  font-weight: 500;
}
.phase-goal {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  font-style: italic;
  margin: 4px 0 18px;
}
.milestone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.milestone {
  background: var(--card-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.milestone-title {
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.milestone-meta {
  font-size: .76rem;
  color: var(--ink-mute);
  font-family: var(--sans);
}

/* Gantt-ish bar */
.gantt {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px;
  margin: 24px 0;
  font-size: .85rem;
}
.gantt-head {
  display: contents;
  font-weight: 600;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
}
.gantt-row {
  display: contents;
}
.gantt-label {
  padding: 10px 0;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
}
.gantt-bar {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  height: 40px;
}
.gantt-track {
  position: relative;
  height: 18px;
  background: var(--paper-deep);
  border-radius: 999px;
  overflow: hidden;
}
.gantt-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-deep) 100%);
  border-radius: 999px;
}
.gantt-fill.amber { background: linear-gradient(90deg, var(--amber) 0%, #8E6A2D 100%); }
.gantt-fill.terra { background: linear-gradient(90deg, var(--terracotta) 0%, #9C5239 100%); }

.gantt-scale {
  display: grid;
  grid-template-columns: repeat(36, 1fr);
  gap: 0;
  font-size: .65rem;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.gantt-scale span {
  text-align: left;
  border-left: 1px solid var(--line-soft);
  padding-left: 2px;
}
.gantt-scale span:nth-child(6n+1) { color: var(--ink); font-weight: 600; }

/* ===== Range slider for self-assessment ===== */
.slider-row {
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
}
.slider-row label { font-weight: 500; color: var(--ink); font-size: .9rem; }
.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--green-deep);
}
.slider-val {
  background: var(--paper-deep);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
  font-size: .92rem;
}

/* ===== Tooltip / Risk panel ===== */
.risk-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 28px;
  min-height: 240px;
}
.risk-panel.empty { display: grid; place-items: center; color: var(--ink-mute); font-style: italic; }
.risk-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.risk-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 600;
}
.risk-id .badge-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid; place-items: center;
  font-size: .8rem;
  font-family: var(--sans);
  font-weight: 700;
}
.risk-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink);
}
.tag.severity-crit { background: var(--risk-crit); color: white; }
.tag.severity-high { background: var(--risk-high); color: white; }
.tag.severity-med  { background: var(--risk-med); color: white; }
.tag.severity-low  { background: var(--risk-low); color: white; }

.risk-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 16px;
}
@media (max-width: 760px) { .risk-grid-2 { grid-template-columns: 1fr; } }
.risk-grid-2 h4 {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 6px;
  font-weight: 700;
}

/* ===== Footer ===== */
.foot {
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot strong { color: var(--ink); }

/* Print */
@media print {
  .nav, .btn, .topbar { display: none !important; }
  body { background: white; }
  .card, .module-tile, .phase, .field-card, .risk-panel { box-shadow: none; break-inside: avoid; }
  .section { page-break-inside: avoid; }
}

/* Legend */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: .82rem;
  color: var(--ink-soft);
  padding: 14px 18px;
  background: var(--card-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  margin: 16px 0 20px;
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-swatch {
  width: 14px; height: 14px;
  border-radius: 4px;
  display: inline-block;
}
.swatch-low  { background: var(--risk-low); }
.swatch-med  { background: var(--risk-med); }
.swatch-high { background: var(--risk-high); }
.swatch-crit { background: var(--risk-crit); }
.swatch-cat-legal  { background: #4A4A8A; }
.swatch-cat-finanz { background: #C26B4B; }
.swatch-cat-markt  { background: #2C5077; }
.swatch-cat-person { background: #8B4A2B; }
.swatch-cat-prozess{ background: #5A8F25; }

/* Editorial flourish */
.divider-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 48px 0;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
}
.divider-orn::before, .divider-orn::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 120px;
}
