/* Shared stylesheet for both front ends: index.html (education variant, shipped
 * as the entry page) and Patientenkalkulator.html (personalised full version).
 *
 * The two pages differ in exactly two rules; Patientenkalkulator.html overrides
 * them in its own small <style> block. Everything else lives here — edit it once,
 * both pages follow. Values below are the ones index.html uses.
 */
:root {
  /* DOUV Brand Colors */
  --navy: #1c2e47;
  --navy-mid: #253a58;
  --navy-light: #3a5878;
  --teal: #2d6fa3;
  --teal-light: #4a8bbf;
  --teal-pale: #eaf2f8;
  --amber: #c97a1a;
  --amber-pale: #fef5e7;
  --red: #c0392b;
  --red-pale: #fdf0ee;
  --green: #6a9e72;
  --green-light: #9ec4a0;
  --green-pale: #eef6ef;
  --blue-pale: #eaf2f8;
  --gray-100: #f4f6f9;
  --gray-200: #e8ecf2;
  --gray-300: #cdd4df;
  --gray-500: #7a8899;
  --white: #fff;
  --text: #1c2e47;
  --text-muted: #5a6e82;
  --r: 10px;
  --rlg: 16px;
  --shadow: 0 4px 12px rgba(28, 46, 71, 0.1), 0 2px 4px rgba(28, 46, 71, 0.06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: "DM Sans", sans-serif;
  background: var(--gray-100);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}
.logo-img-bg {
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  flex-shrink: 0;
}
.logo-img-bg img {
  height: 30px;
  width: auto;
  display: block;
}
.logo-tagline {
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.logo-tagline-top {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.logo-tagline-sub {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.3;
}
.header-badge {
  font-size: 11px;
  background: rgba(224, 90, 0, 0.85);
  padding: 3px 9px;
  border-radius: 20px;
  color: #fff;
  font-weight: 500;
}
.hero {
  background: linear-gradient(135deg, #dcefe1 0%, #c6e3cf 55%, #aed5ba 100%);
  color: #1f4d33;
  padding: 2rem 1rem 2.5rem;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2f6b45;
  background: rgba(106, 158, 114, 0.22);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}
.hero h1 {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.hero h1 em {
  font-style: normal;
  color: #3f8a5a;
}
.hero-sub {
  font-size: 16px;
  color: #3c6b4e;
  font-weight: 400;
}
.main-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr 300px;
    padding: 1.5rem;
  }
}
.card {
  background: var(--white);
  border-radius: var(--rlg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--teal-pale);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-header-icon svg {
  width: 15px;
  height: 15px;
  stroke: var(--navy-light);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.card-body {
  padding: 1rem 1.25rem;
}
.steps-nav {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--r);
  padding: 3px;
  margin-bottom: 1.25rem;
}
.step-btn {
  flex: 1;
  min-height: 44px;
  padding: 6px 4px;
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  -webkit-appearance: none;
  font-family: "DM Sans", sans-serif;
}
.step-btn.active {
  background: #fff;
  color: var(--navy);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(13, 33, 55, 0.08);
}
.step-btn.done .step-num {
  background: var(--green);
  color: #fff;
}
.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gray-200);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
}
.step-btn.active .step-num {
  background: var(--green);
  color: #fff;
}
.step-panel {
  display: none;
}
.step-panel.active {
  display: block;
}
.form-row {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-family: "DM Sans", sans-serif;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r);
  background: #fff;
  color: var(--text);
  -webkit-appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--navy-light);
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}
.gender-group {
  display: flex;
  gap: 8px;
}
.gender-btn {
  flex: 1;
  min-height: 52px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: "DM Sans", sans-serif;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-appearance: none;
}
.gender-btn.active {
  border-color: var(--green);
  background: var(--green-pale);
  color: var(--green);
  font-weight: 500;
}
.gender-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.age-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-pale);
  border: 1.5px solid var(--green);
  border-radius: var(--r);
  padding: 0 12px;
  width: 100%;
  height: 48px;
}
.age-badge-num {
  font-size: 20px;
  font-weight: 500;
  color: var(--green);
  font-family: "DM Sans", sans-serif;
  white-space: nowrap;
  line-height: 1;
}
.age-badge-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.age-badge.missing {
  background: var(--gray-100);
  border-color: var(--gray-300);
}
.age-badge.missing .age-badge-num {
  color: var(--gray-500);
  font-size: 14px;
  font-family: "DM Sans", sans-serif;
}
.patient-chip {
  background: var(--navy);
  color: #fff;
  border-radius: var(--r);
  padding: 10px 12px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.patient-chip-name {
  font-size: 14px;
  font-weight: 500;
}
.patient-chip-detail {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.patient-chip-tag {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
}
.rf-group {
  margin-bottom: 6px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r);
  overflow: hidden;
}
.rf-group-header {
  min-height: 48px;
  padding: 10px 12px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.rf-group-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  pointer-events: none;
}
.rf-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  margin-left: 6px;
  pointer-events: none;
}
.rf-chevron {
  width: 16px;
  height: 16px;
  stroke: var(--gray-500);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.rf-items {
  display: none;
}
.rf-items.open {
  display: block;
}
.rf-item {
  min-height: 48px;
  padding: 10px 12px 10px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-top: 1px solid var(--gray-200);
  gap: 8px;
}
.rf-item.selected {
  background: var(--green-pale);
}
.rf-item-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -24px;
  margin-right: 6px;
  pointer-events: none;
}
.rf-item.selected .rf-item-check {
  background: var(--green);
  border-color: var(--green);
}
.rf-item.selected .rf-item-check::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}
.rf-item-label {
  font-size: 13px;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
  pointer-events: none;
}
.rf-item-grad {
  font-size: 11px;
  font-weight: 600;
  color: var(--navy-light);
  background: var(--blue-pale);
  padding: 3px 8px;
  border-radius: 5px;
  flex-shrink: 0;
  pointer-events: none;
}
.factor-bar {
  background: var(--navy);
  border-radius: var(--r);
  padding: 0.9rem 1.1rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}
.factor-bar-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1px;
}
.factor-bar-val {
  font-size: 24px;
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
}
.factor-bar-formula {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}
.slider-val {
  font-size: 26px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
  font-family: "DM Sans", sans-serif;
}
input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  touch-action: pan-y;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy-light);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--navy-light);
}
/* Slider-Labels exakt unter Tick-Positionen ausrichten.
   Thumb-Radius=13px. Labels per position:absolute mit calc() gesetzt. */
.slider-labels {
  position: relative;
  height: 16px;
  margin-top: 4px;
}
.slider-labels span {
  position: absolute;
  font-size: 10px;
  color: var(--gray-500);
  transform: translateX(-50%);
}
.slider-labels span:nth-child(1) {
  left: calc(0 * (100% - 26px) / 4 + 13px);
}
.slider-labels span:nth-child(2) {
  left: calc(1 * (100% - 26px) / 4 + 13px);
}
.slider-labels span:nth-child(3) {
  left: calc(2 * (100% - 26px) / 4 + 13px);
}
.slider-labels span:nth-child(4) {
  left: calc(3 * (100% - 26px) / 4 + 13px);
}
.slider-labels span:nth-child(5) {
  left: calc(4 * (100% - 26px) / 4 + 13px);
}
.tscore-band {
  display: flex;
  margin-top: 10px;
  margin-left: 13px;
  margin-right: 13px;
  border-radius: 4px;
  overflow: hidden;
  height: 6px;
}
.tscore-direct {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.tscore-direct label {
  font-size: 12px;
  color: var(--text-muted);
}
.tscore-direct input {
  width: 90px;
  padding: 8px 10px;
  font-size: 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r);
  font-family: "DM Sans", sans-serif;
  -webkit-appearance: none;
}
.threshold-trio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 1rem;
}
.thresh-mini {
  border-radius: var(--r);
  padding: 10px;
  text-align: center;
  border: 1.5px solid transparent;
}
.thresh-mini-pct {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 1px;
}
.thresh-mini-label {
  font-size: 10px;
  color: var(--text-muted);
}
.thresh-mini-factor {
  font-size: 11px;
  font-weight: 500;
  margin-top: 3px;
}
.result-hero {
  border-radius: var(--rlg);
  padding: 1.25rem 1rem;
  text-align: center;
  margin-bottom: 2.5rem;
}
.result-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 5px;
}
.result-risk {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  line-height: 1.2;
  margin-bottom: 4px;
}
.result-desc {
  font-size: 13px;
  opacity: 0.75;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 1.25rem;
}
.result-cell {
  border-radius: var(--r);
  padding: 10px 8px;
  text-align: center;
}
.result-cell-pct {
  font-size: 13px;
  font-weight: 600;
}
.result-cell-needed {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.result-cell-check {
  font-size: 16px;
  margin-top: 5px;
}
.med-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--gray-200);
}
.med-item {
  display: flex;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: flex-start;
}
.med-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2px;
}
.med-badge.t3 {
  background: var(--blue-pale);
  color: var(--navy-light);
}
.med-badge.t5 {
  background: var(--amber-pale);
  color: var(--amber);
}
.med-badge.t10 {
  background: var(--red-pale);
  color: var(--red);
}
.med-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
}
.med-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.no-therapy {
  background: var(--green-pale);
  border-radius: var(--r);
  padding: 1rem;
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}
.btn-primary {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
  color: #fff;
  background: var(--green);
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: 1rem;
}
.btn-primary:active {
  opacity: 0.88;
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 1rem;
}
.btn-row .btn-primary {
  margin-top: 0;
  flex: 1;
}
.btn-secondary {
  min-height: 52px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: "DM Sans", sans-serif;
  color: var(--text-muted);
  background: #fff;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r);
  cursor: pointer;
  -webkit-appearance: none;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.info-card {
  background: #fff;
  border-radius: var(--rlg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.info-card-header {
  padding: 0.9rem 1.1rem 0.7rem;
  border-bottom: 1px solid var(--gray-200);
}
.info-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.info-card-body {
  padding: 0.9rem 1.1rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.summary-row:last-child {
  border-bottom: none;
}
.summary-key {
  color: var(--text-muted);
}
.summary-val {
  font-weight: 500;
  color: var(--navy);
}
.method-step {
  display: flex;
  gap: 9px;
  padding: 6px 0;
}
.method-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.method-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.age-warning {
  background: var(--amber-pale);
  border: 1px solid var(--amber);
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--amber);
  margin-top: 8px;
  display: none;
}
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 11px;
  margin-top: 2rem;
}
.site-footer strong {
  color: rgba(255, 255, 255, 0.7);
}
@media (max-width: 767px) {
  .sidebar {
    display: none;
  }
}

.btn-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: "DM Sans", sans-serif;
  color: #fff;
  background: #0d2137;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: 12px;
}
.btn-pdf:active {
  opacity: 0.85;
}
.btn-pdf svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  pointer-events: none;
}
.btn-pdf-spin {
  display: none;
  width: 19px;
  height: 19px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pdfspin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes pdfspin {
  to {
    transform: rotate(360deg);
  }
}
.pdf-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 5px;
  line-height: 1.5;
}
