:root {
    --teal: #2e7fc1;
    --teal-light: #e8f2fa;
    --teal-mid: #b3d4ed;
    --text: #1a1a1a;
    --text-sec: #6b7280;
    --border: #e5e7eb;
    --bg: #f4f5f7;
    --white: #ffffff;
    --red: #dc2626;
    --red-light: #fef2f2;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px 48px;
  }




  /* ── Privacy badge ── */
  .privacy-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2C2C2A;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 500;
    padding: 13px 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 820px;
    margin-bottom: 16px;
  }
  .privacy-badge svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--teal); }
  .privacy-badge .dsgvo-pill {
    margin-left: auto;
    font-size: 11px;
    background: var(--teal);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
  }

  /* ── Card ── */
  .card {
    width: 100%;
    max-width: 820px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
  }

  /* ── Steps bar ── */
  .steps-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
  }
  .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
  }
  .step-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    transition: all 0.25s ease;
    background: var(--border);
    color: var(--text-sec);
  }
  .step-item.active .step-circle { background: var(--teal); color: white; }
  .step-item.done .step-circle { background: var(--teal); color: white; }
  .step-item.done .step-circle::after { content: "✓"; font-size: 14px; }
  .step-item.done .step-num { display: none; }
  .step-label {
    font-size: 11px; color: var(--text-sec); white-space: nowrap;
    transition: color 0.25s;
  }
  .step-item.active .step-label { color: var(--text); font-weight: 500; }
  .step-connector {
    width: 100px; height: 2px;
    background: var(--border);
    margin-bottom: 18px;
    flex-shrink: 0;
    transition: background 0.4s;
  }
  .step-connector.done { background: var(--teal); }

  /* ── Step content ── */
  .step-content { padding: 24px; min-height: 340px; }
  .step-panel { display: none; }
  .step-panel.active { display: block; }
  #panel-2, #panel-3 { display: none !important; }

  /* ── Drop zone ── */
  .drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
  }
  .drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--teal);
    background: var(--teal-light);
  }
  .drop-zone input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
  }
  .drop-icon {
    width: 48px; height: 48px; margin: 0 auto 14px;
    background: var(--teal-light);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
  }
  .drop-icon svg { width: 24px; height: 24px; color: var(--teal); }
  .drop-zone h3 { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
  .drop-zone p { font-size: 13px; color: var(--text-sec); }
  .drop-zone .ext-badge {
    display: inline-block; margin-top: 12px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 4px; padding: 3px 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; color: var(--text-sec);
  }

  /* ── File selected state (step 2+) ── */
  .file-info {
    display: none;
    background: var(--teal-light);
    border: 1.5px solid var(--teal-mid);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
  }
  .file-info.visible { display: flex; align-items: center; gap: 12px; }
  .file-info-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    background: white; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--teal-mid);
  }
  .file-info-icon svg { width: 18px; height: 18px; color: var(--teal); }
  .file-info-text { flex: 1; min-width: 0; }
  .file-info-name { font-size: 13px; font-weight: 500; font-family: ui-monospace, monospace; }
  .file-info-meta { font-size: 11px; color: var(--text-sec); margin-top: 2px; }
  .file-info-remove {
    background: none; border: none; cursor: pointer; color: var(--text-sec);
    font-size: 18px; line-height: 1; padding: 2px;
    transition: color 0.15s;
  }
  .file-info-remove:hover { color: var(--red); }

  /* ── Praxis hero card (step 1 after file load) ── */
  .praxis-card {
    display: none;
    border: 1.5px solid var(--teal-mid);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    animation: fadeIn 0.25s ease;
  }
  .praxis-card.visible { display: block; }
  .praxis-card-header {
    background: var(--teal);
    padding: 18px 20px 16px;
    display: flex; align-items: flex-start; justify-content: space-between;
  }
  .praxis-card-name {
    font-size: 20px; font-weight: 600; color: white; line-height: 1.2;
    flex: 1; min-width: 0;
  }
  .praxis-card-quartal {
    font-size: 20px; font-weight: 600; color: rgba(255,255,255,0.9); margin-top: 4px;
  }
  .praxis-card-filename {
    font-size: 10.5px; color: rgba(255,255,255,0.55);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; margin-top: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 480px;
  }
  .praxis-card-remove {
    background: rgba(255,255,255,0.15); border: none; cursor: pointer;
    color: white; font-size: 16px; line-height: 1; padding: 4px 8px;
    border-radius: 4px; transition: background 0.15s; flex-shrink: 0; margin-left: 12px;
  }
  .praxis-card-remove:hover { background: rgba(255,255,255,0.3); }

  /* ── KPI grid ── */
  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    border-top: 1.5px solid var(--teal-mid);
    background: white;
  }
  .kpi-item {
    padding: 10px 8px;
    border-right: 1px solid var(--border);
    text-align: center;
  }
  .kpi-item:last-child { border-right: none; }
  .kpi-item.wide { grid-column: span 2; border-right: 1px solid var(--border); }
  .kpi-value {
    font-size: 18px; font-weight: 600; color: var(--teal); line-height: 1;
  }
  .kpi-label {
    font-size: 10px; color: var(--text-sec); margin-top: 4px; line-height: 1.3;
  }
  .kpi-value.loading { color: var(--border); font-size: 14px; }
  /* gender / insurance bars */
  .kpi-bar-wrap { display: flex; gap: 3px; margin-top: 6px; align-items: center; justify-content: center; }
  .kpi-bar-seg { height: 6px; border-radius: 3px; transition: width 0.4s ease; }
  .kpi-bar-legend { display: flex; gap: 8px; justify-content: center; margin-top: 4px; flex-wrap: wrap; }
  .kpi-bar-legend-item { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-sec); }
  .kpi-bar-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  /* GOP spectrum tags */
  .gop-tags { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 5px; max-height: 52px; overflow: hidden; }
  .gop-tag { font-size: 9px; font-family: ui-monospace, monospace; background: var(--teal-light); color: var(--teal); padding: 1px 5px; border-radius: 3px; }

  /* ── Buttons ── */
  .btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 5px;
    font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: 500;
    cursor: pointer; border: none; transition: all 0.15s; text-decoration: none;
  }
  .btn-primary { background: var(--teal); color: white; }
  .btn-primary:hover { background: #1e6aaa; }
  .btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }
  .btn-outline {
    background: white; color: var(--text);
    border: 1px solid var(--border);
  }
  .btn-outline:hover { border-color: #9ca3af; }
  .btn svg { width: 15px; height: 15px; }

  /* ── Result box ── */
  .result-box {
    display: none;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
  }
  .result-box.visible { display: block; }
  .result-box.success { background: var(--green-light); border: 1px solid #bbf7d0; }
  .result-box.error { background: var(--red-light); border: 1px solid #fecaca; }
  .result-box h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
  .result-box.success h4 { color: var(--green); }
  .result-box.error h4 { color: var(--red); }
  .result-box p { font-size: 12.5px; color: var(--text-sec); line-height: 1.6; }
  .result-box .stat { font-weight: 500; color: var(--text); }

  /* ── Info box ── */
  .info-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-sec);
    line-height: 1.7;
  }
  .info-box strong { color: var(--text); font-weight: 500; }
  .info-box .field-codes {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 8px;
    line-height: 2;
  }
  .field-code {
    display: inline-block;
    background: var(--teal-light);
    color: var(--teal);
    border-radius: 3px;
    padding: 1px 6px;
    margin: 1px;
  }

  /* ── Step 3 mail info ── */
  .mail-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 13px;
  }
  .mail-row:last-child { border-bottom: none; }
  .mail-label { color: var(--text-sec); width: 100px; flex-shrink: 0; }
  .mail-value { color: var(--text); font-weight: 500; }

  /* ── Download section ── */
  .download-section {
    display: none;
    background: var(--teal-light);
    border: 1.5px solid var(--teal-mid);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
  }
  .download-section.visible { display: flex; align-items: center; gap: 14px; }
  .download-section .dl-text { flex: 1; }
  .download-section h4 { font-size: 13px; font-weight: 600; color: var(--teal); }
  .download-section p { font-size: 12px; color: var(--text-sec); margin-top: 3px; font-family: ui-monospace, monospace; }

  /* ── Footer nav ── */
  .card-footer { display: none;
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
  }
  .card-footer .btn-back {
    margin-right: auto;
  }

  /* ── Progress spinner ── */
  .spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ── Privacy notice ── */
  .privacy-notice {
    max-width: 820px;
    width: 100%;
    margin-top: 20px;
    font-size: 11.5px;
    color: var(--text-sec);
    text-align: center;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
  }
  .privacy-notice svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; color: var(--teal); }

  /* ── Transitions ── */
  .step-panel { animation: fadeIn 0.2s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

  /* ── Finder guide ── */
  .finder-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 16px; margin-bottom: 8px; flex-wrap: wrap; gap: 8px;
  }
  .finder-question {
    font-size: 14px; font-weight: 600; color: var(--text);
  }
  .finder-os-btns { display: flex; gap: 6px; }
  .finder-tab-link {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 14px; border-radius: 6px; font-size: 12.5px;
    font-weight: 500; cursor: pointer; transition: all 0.15s;
    font-family: Arial, Helvetica, sans-serif; border: 1.5px solid var(--border);
    background: white; color: var(--text-sec);
  }
  .finder-tab-link:hover { border-color: var(--teal); color: var(--teal); }
  .finder-tab-link.active {
    background: var(--teal); color: white; border-color: var(--teal);
    box-shadow: 0 2px 6px rgba(46,127,193,0.25);
  }
  .finder-guide {
    display: block; border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden; background: white;
  }
  .finder-tabs { display: none; }
  .finder-tab {
    padding: 8px 18px; font-size: 12px; font-weight: 500;
    cursor: pointer; border: none; background: none;
    color: var(--text-sec); border-bottom: 2px solid transparent;
    margin-bottom: -1px; font-family: Arial, Helvetica, sans-serif;
    transition: color 0.15s;
  }
  .finder-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
  .finder-pane { display: none; padding: 16px 18px; }
  .finder-pane.active { display: block; }
  .finder-step {
    display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start;
  }
  .finder-step:last-child { margin-bottom: 0; }
  .finder-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--teal); color: white;
    font-size: 11px; font-weight: 600; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .finder-text { font-size: 12px; line-height: 1.6; color: var(--text); }
  .finder-text code {
    font-family: ui-monospace, monospace; font-size: 11px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 3px; padding: 1px 5px; color: var(--text);
  }
  .finder-text kbd {
    font-family: ui-monospace, monospace; font-size: 11px;
    background: #f0f0f0; border: 1px solid #ccc; border-radius: 3px;
    padding: 1px 6px; color: var(--text); box-shadow: 0 1px 0 #ccc;
  }

  /* ── Hero section ── */
  .hero {
    max-width: 820px;
    margin: 0 auto 24px;
    text-align: center;
    padding: 16px 0 8px;
  }
  .hero .eyebrow {
    font-size: 12.5px;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin-bottom: 12px;
  }
  .hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a2940;
    line-height: 1.15;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
  }
  .hero p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-sec);
    max-width: 680px;
    margin: 0 auto 12px;
  }
  .hero .privacy-line {
    font-size: 13px;
    color: var(--teal);
    font-weight: 600;
    margin-top: 14px;
  }
  @media (max-width: 600px) {
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 14px; }
  }

  /* ── Bridge section between tool and booking ── */
  .bridge {
    max-width: 820px;
    margin: 32px auto 0;
    padding: 28px 32px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
  }
  .bridge h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a2940;
    line-height: 1.3;
    margin-bottom: 14px;
  }
  .bridge p.lead {
    font-size: 14.5px;
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 16px;
  }
  .bridge ul {
    list-style: none;
    padding: 0;
    margin: 14px 0;
  }
  .bridge ul li {
    position: relative;
    padding: 7px 0 7px 24px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
  }
  .bridge ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--teal);
    font-weight: 700;
  }
  .bridge .closing {
    margin-top: 14px;
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    border-top: 1px solid var(--border);
    padding-top: 14px;
  }

  /* ── Testimonial ── */
  .testimonial {
    max-width: 820px;
    margin: 24px auto 0;
    padding: 24px 32px;
    background: var(--teal-light);
    border-left: 4px solid var(--teal);
    border-radius: 6px;
  }
  .testimonial blockquote {
    font-size: 16px;
    line-height: 1.5;
    color: #1a2940;
    font-style: italic;
    margin-bottom: 10px;
    quotes: "„" """;
  }
  .testimonial blockquote::before { content: open-quote; }
  .testimonial blockquote::after { content: close-quote; }
  .testimonial cite {
    font-size: 13px;
    color: var(--teal);
    font-weight: 700;
    font-style: normal;
  }

  /* ── Booking section ── */
  .booking-section {
    display: none;
    max-width: 820px;
    margin: 24px auto 0;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
  }
  .booking-section.visible { display: block; }
  .booking-header {
    background: linear-gradient(135deg, #2e7fc1 0%, #1e6aaa 100%);
    color: white;
    padding: 28px 32px;
  }
  .booking-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
  }
  .booking-header p {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
  }
  .booking-content {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
  }
  .booking-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a2940;
    margin-top: 0;
    margin-bottom: 12px;
  }
  .booking-content h3:not(:first-child) { margin-top: 26px; }
  .booking-content ul.what-you-get {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .booking-content ul.what-you-get li {
    position: relative;
    padding: 6px 0 6px 26px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text);
  }
  .booking-content ul.what-you-get li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--teal);
    font-weight: 700;
    font-size: 14px;
  }

  /* ── Accordion ── */
  .accordion-item {
    border-top: 1px solid var(--border);
  }
  .accordion-item:last-child { border-bottom: 1px solid var(--border); }
  .accordion-toggle {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 13px 0 13px 26px;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    transition: color 0.15s;
    font-weight: 500;
  }
  .accordion-toggle:hover { color: var(--teal); }
  .accordion-toggle::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: var(--teal-light);
    color: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    transition: transform 0.2s, background 0.2s;
  }
  .accordion-item.open .accordion-toggle::before {
    content: "−";
    background: var(--teal);
    color: white;
  }
  .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0 0 26px;
  }
  .accordion-item.open .accordion-content {
    max-height: 400px;
    padding: 0 0 14px 26px;
  }
  .accordion-content p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-sec);
    margin: 0;
  }

  .booking-cta {
    padding: 24px 32px;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }
  .booking-cta-btn {
    background: var(--teal);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(46,127,193,0.25);
  }
  .booking-cta-btn:hover {
    background: #1e6aaa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46,127,193,0.35);
  }
  .booking-cta-hint {
    font-size: 12px;
    color: var(--text-sec);
    margin-top: 10px;
  }
  .booking-form-wrap {
    display: none;
    padding: 24px 32px 32px;
    border-top: 1px solid var(--border);
  }
  .booking-form-wrap.visible { display: block; }
  .booking-file-ready {
    background: #e8f5e9;
    border: 1.5px solid #a5d6a7;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    color: #2e7d32;
    font-weight: 500;
  }
  .booking-file-ready svg { width: 22px; height: 22px; flex-shrink: 0; }
  .download-mini {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-sec);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
  }
  .download-mini:hover { color: var(--teal); }

  @media (max-width: 600px) {
    .step-connector { width: 48px; }
    .privacy-badge span { display: none; }
    .drop-zone { padding: 32px 16px; }
  }