@font-face { font-family: 'Zuume'; src: url('assets/Zuume-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Spline Sans'; src: url('assets/SplineSans-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Spline Sans'; src: url('assets/SplineSans-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Spline Sans'; src: url('assets/SplineSans-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Spline Sans'; src: url('assets/SplineSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --blue: #1DA8FF;
  --blue-light: #5BC3FF;
  --red: #FA3319;
  --red-light: #FF6650;
  --dark: #0D0F1B;
  --navy: #111320;
  --navy-2: #181B2E;
  --navy-3: #1F2340;
  --white: #FFFFFF;
  --off-white: #E8EAF0;
  --gray-light: #B0B4C8;
  --gray: #6B7094;
  --gradient: linear-gradient(90deg, #1DA8FF 0%, #FA3319 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse at bottom right, rgba(29,168,255,0.15) 0%, var(--dark) 60%) fixed, var(--dark);
  color: var(--off-white);
  font-family: 'Spline Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3, .zuume {
  font-family: 'Zuume', 'Arial Narrow', sans-serif;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--white);
  margin: 0;
}
.print-only { display: none; }

/* Kopf */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 20px 20px 0; }
.logo { height: 34px; width: auto; display: block; }
.top-actions { display: flex; gap: 8px; }
.btn-ghost {
  font: 600 13px 'Spline Sans', sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--off-white); background: transparent; border: 1px solid var(--navy-3); padding: 10px 14px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--white); }

main { max-width: 1180px; margin: 0 auto; padding: 0 20px 48px; }
.hero { padding: 44px 0 28px; max-width: 720px; }
.overline { font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin: 0 0 10px; }
h1 { font-size: clamp(48px, 8vw, 80px); }
h1 span { color: var(--blue); }
.lead { font-size: 18px; color: var(--gray-light); margin: 16px 0 0; }

/* Rollen */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.role {
  text-align: left; background: var(--navy); border: 1px solid var(--navy-3); border-top: 4px solid var(--navy-3);
  color: var(--off-white); padding: 16px 18px; cursor: pointer; font-family: inherit;
}
.role strong { display: block; font: italic 700 28px 'Zuume', sans-serif; text-transform: uppercase; letter-spacing: 0.04em; color: var(--white); line-height: 1.1; }
.role span { display: block; font-size: 14px; color: var(--gray-light); margin-top: 2px; }
.role:hover { border-color: var(--gray); border-top-color: var(--gray); }
.role[aria-selected="true"] { border-color: var(--blue); border-top-color: var(--blue); background: var(--navy-2); }
.role[aria-selected="true"] strong { color: var(--blue); }

/* Raster */
.grid { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 20px; align-items: start; }
.card { background: var(--navy); border-top: 4px solid var(--blue); padding: 26px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.card.red { border-top-color: var(--red); }
.card h2 { font-size: 34px; margin-bottom: 18px; }
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.form-head h2 { margin-bottom: 0; }
.form-head .btn-ghost { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.card h3 { font-size: 26px; margin-bottom: 12px; }

/* Formular */
.mode { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; border: 1px solid var(--navy-3); }
.mode:empty { display: none; }
.mode button { font: 600 13px 'Spline Sans', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; padding: 11px 8px; background: transparent; color: var(--gray-light); border: 0; cursor: pointer; }
.mode button[aria-pressed="true"] { background: var(--blue); color: var(--dark); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; color: var(--white); margin-bottom: 6px; }
.field .hint { display: block; font-weight: 300; font-size: 13px; color: var(--gray-light); margin-top: 5px; }
.input { display: flex; align-items: stretch; background: var(--dark); border: 1px solid var(--navy-3); }
.input:focus-within { border-color: var(--blue); }
.input input, .input select {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--white);
  font: 600 18px 'Spline Sans', sans-serif; padding: 12px 14px; font-variant-numeric: tabular-nums;
}
.input input::placeholder { color: var(--gray); font-weight: 400; }
.input select { appearance: none; cursor: pointer; }
.input select option { background: var(--dark); }
.input .unit { display: flex; align-items: center; padding: 0 14px; color: var(--gray-light); font-size: 14px; border-left: 1px solid var(--navy-3); white-space: nowrap; }
.field.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 132px); gap: 10px; align-items: end; }
.field.split .input { min-width: 0; }
.field.split .input select { width: 100%; padding-right: 8px; }
.field.split .hint { grid-column: 1 / -1; margin-top: -1px; }
.field.split label { grid-column: 1 / -1; margin-bottom: -4px; }

details { border-top: 1px solid var(--navy-3); margin-top: 22px; padding-top: 6px; }
summary { cursor: pointer; padding: 12px 0; list-style: none; position: relative; padding-right: 28px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 2px; top: 8px; font: 400 26px 'Spline Sans', sans-serif; color: var(--blue); }
details[open] summary::after { content: '\2212'; }
summary span { display: block; font-weight: 700; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white); }
summary small { display: block; font-weight: 300; font-size: 13px; color: var(--gray-light); margin-top: 2px; }
#fields-optional { padding-top: 8px; }
.btn-reset { margin-top: 10px; background: none; border: 0; padding: 6px 0; color: var(--gray); font: 400 13px 'Spline Sans', sans-serif; text-decoration: underline; cursor: pointer; }
.btn-reset:hover { color: var(--off-white); }

/* Ergebnis */
.results { display: grid; gap: 20px; min-width: 0; }
.empty { border: 1px dashed var(--navy-3); padding: 48px 26px; text-align: center; color: var(--gray-light); }
.empty .zuume { font-size: 34px; display: block; margin-bottom: 6px; }

.focus { position: relative; overflow: hidden; }
.focus::after { content: ''; position: absolute; right: -40px; top: -20px; width: 200px; height: 140%; background: var(--blue); opacity: 0.07; transform: skewX(-18deg); pointer-events: none; }
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px; }
.kpi .value { font: italic 700 76px/0.95 'Zuume', sans-serif; letter-spacing: 0.02em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; padding-right: 6px; }
.kpi.small .value { font-size: 52px; background: none; color: var(--white); }
.kpi .label { font-weight: 700; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white); margin-top: 6px; }
.kpi .sub { font-weight: 300; font-size: 13px; color: var(--gray-light); }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 12px 8px; border-bottom: 1px solid var(--navy-3); }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-light); }
tbody td { font-weight: 600; font-size: 20px; color: var(--white); }
tbody td:first-child { font-weight: 400; font-size: 16px; color: var(--off-white); }
tbody td small { display: block; font-weight: 300; font-size: 13px; color: var(--gray-light); }
tbody tr:last-child td { border-bottom: 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 22px; margin: 0; }
.facts div { border-left: 3px solid var(--navy-3); padding-left: 12px; }
.facts dt { font-weight: 300; font-size: 13px; color: var(--gray-light); }
.facts dd { margin: 0; font-weight: 600; font-size: 20px; color: var(--white); font-variant-numeric: tabular-nums; }

.note { font-size: 14px; color: var(--gray-light); margin: 14px 0 0; }
.warning { border-left: 4px solid var(--red); background: rgba(250,51,25,0.1); padding: 12px 14px; font-size: 15px; color: var(--off-white); margin: 0 0 14px; }

/* Sales-Cycle-Diagramm */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 8px; }
.bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.bar i { display: block; background: var(--blue); min-height: 2px; }
.bar.late i { background: var(--red); }
.bar b { font-weight: 600; font-size: 12px; color: var(--white); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.bar span { font-size: 11px; color: var(--gray-light); margin-top: 6px; letter-spacing: 0.04em; }

footer { max-width: 1180px; margin: 0 auto; padding: 0 20px 28px; }
.gradient-line { height: 3px; background: var(--gradient); }
footer p { font-weight: 300; font-size: 12px; color: var(--gray); margin: 12px 0 0; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 10px; font-size: 13px; color: var(--gray-light); }
.legal nav { display: flex; gap: 20px; }
.legal a { color: var(--gray-light); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--white); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--blue); color: var(--dark); font-weight: 600; font-size: 14px; padding: 10px 16px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 28px 0 22px; }
  .lead { font-size: 16px; }
}
@media (max-width: 620px) {
  .top { padding: 16px 16px 0; }
  main { padding: 0 16px 40px; }
  footer { padding: 0 16px 24px; }
  .logo { height: 26px; }
  .btn-ghost { padding: 8px 10px; font-size: 11px; }
  #btn-print { display: none; }
  .roles { grid-template-columns: 1fr; gap: 8px; }
  .role { padding: 12px 14px; }
  .role strong { font-size: 24px; }
  .card { padding: 20px 16px; }
  .kpi .value { font-size: 64px; }
  tbody td { font-size: 17px; }
  tbody td:first-child { font-size: 14px; }
  th, td { padding: 10px 5px; }
  .bars { gap: 3px; }
  .bar b { font-size: 10px; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #111; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .logo { filter: invert(1); }
  h1, h2, h3, .zuume, .role-print, tbody td, .facts dd, .field label, .kpi .label, .bar b, summary span { color: #111 !important; }
  h1 { font-size: 44px; }
  h1 span { color: #0E7ACC; }
  .hero { padding: 16px 0 10px; }
  .lead, .field .hint, .unit, summary small, .btn-reset { display: none !important; }
  .role-print { font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px; margin: 0 0 12px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card { background: #fff; box-shadow: none; border: 1px solid #ccd; border-top: 4px solid #1DA8FF; padding: 16px; break-inside: avoid; }
  .card.red { border-top-color: #FA3319; }
  .focus::after { display: none; }
  .input { border: 0; background: none; }
  .input input, .input select { color: #111; padding: 0; font-size: 15px; }
  .field { margin-bottom: 6px; display: grid; grid-template-columns: 1fr 1fr; }
  .field label { margin: 0; font-weight: 400; }
  .kpi .value { -webkit-text-fill-color: #0E7ACC; color: #0E7ACC; background: none; font-size: 54px; }
  .kpi.small .value { -webkit-text-fill-color: #111; color: #111; font-size: 40px; }
  th, td, .facts div { border-color: #ccd; }
  thead th, .kpi .sub, tbody td small, .facts dt, .note, .bar span, tbody td:first-child, footer p { color: #555 !important; }
  .warning { color: #111; }
  .bars { height: 110px; }
  .bar i, .mode button[aria-pressed="true"] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  details { border: 0; margin-top: 4px; }
}
