  :root {
    --bg: #F6F5F1;
    --surface: #FFFFFF;
    --surface-2: #F0EEE7;
    --border: #E4E1D8;
    --text: #14141A;
    --text-muted: #6B6B66;
    --text-faint: #8A8678;
    --accent: #2F6B4E;
    --accent-soft: #E9F1EC;
    --warn: #8A6A2F;
    --warn-soft: #F3EDE1;
    --info: #5B7B93;
    --info-soft: #E9EEF2;
    --cta-bg: #14141A;
    --cta-text: #FFFFFF;
    --cta-hover: #000000;
    --danger: #A13F3F;
    --danger-soft: #F6E9E9;
    --gold: #96773C;
    --gold-soft: #F1EBDD;
    --gold-line: #C9B183;
    --chart-1: #2F6B4E;
    --chart-2: #5B7B93;
    --chart-3: #A98B5D;
    --chart-4: #6B6B66;
    --chart-5: #C9C6BB;
    --region-1: #2F6B4E;
    --region-2: #4F8A69;
    --region-3: #7BAA8D;
    --region-4: #A9CBB9;
    --shadow-card: 0 1px 2px rgba(20,20,26,0.04);
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #17171B;
      --surface: #1E1E23;
      --surface-2: #232328;
      --border: #34343B;
      --text: #F2F1EC;
      --text-muted: #A6A499;
      --text-faint: #7D7B72;
      --accent: #4F9271;
      --accent-soft: rgba(79,146,113,0.16);
      --warn: #C9A15B;
      --warn-soft: rgba(201,161,91,0.16);
      --info: #7FA3BE;
      --info-soft: rgba(127,163,190,0.16);
      --cta-bg: #F2F1EC;
      --cta-text: #14141A;
      --cta-hover: #FFFFFF;
      --danger: #C97D7D;
      --danger-soft: rgba(201,125,125,0.16);
      --gold: #C9A868;
      --gold-soft: rgba(201,168,104,0.14);
      --gold-line: #A38A56;
      --chart-1: #4F9271;
      --chart-2: #7FA3BE;
      --chart-3: #C9A15B;
      --chart-4: #9C9A91;
      --chart-5: #54545C;
      --region-1: #4F9271;
      --region-2: #6DAE8D;
      --region-3: #94C7AC;
      --region-4: #BFDFCF;
      --shadow-card: 0 1px 2px rgba(0,0,0,0.3);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #17171B;
    --surface: #1E1E23;
    --surface-2: #232328;
    --border: #34343B;
    --text: #F2F1EC;
    --text-muted: #A6A499;
    --text-faint: #7D7B72;
    --accent: #4F9271;
    --accent-soft: rgba(79,146,113,0.16);
    --warn: #C9A15B;
    --warn-soft: rgba(201,161,91,0.16);
    --info: #7FA3BE;
    --info-soft: rgba(127,163,190,0.16);
    --cta-bg: #F2F1EC;
    --cta-text: #14141A;
    --cta-hover: #FFFFFF;
    --danger: #C97D7D;
    --danger-soft: rgba(201,125,125,0.16);
    --gold: #C9A868;
    --gold-soft: rgba(201,168,104,0.14);
    --gold-line: #A38A56;
    --chart-1: #4F9271;
    --chart-2: #7FA3BE;
    --chart-3: #C9A15B;
    --chart-4: #9C9A91;
    --chart-5: #54545C;
    --region-1: #4F9271;
    --region-2: #6DAE8D;
    --region-3: #94C7AC;
    --region-4: #BFDFCF;
    --shadow-card: 0 1px 2px rgba(0,0,0,0.3);
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; margin: 0; text-wrap: balance; }
  p { margin: 0; }
  a, button { font-family: inherit; }
  a { color: inherit; text-decoration: none; }
  button { cursor: pointer; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  }

  .wrap { max-width: 1280px; margin: 0 auto; padding-left: 48px; padding-right: 48px; }
  @media (max-width: 720px) { .wrap { padding-left: 22px; padding-right: 22px; } }

  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; font-weight: 500; border-radius: 2px; padding: 14px 24px; border: 1px solid transparent; text-decoration: none; transition: background 0.15s, border-color 0.15s; white-space: nowrap; }
  .btn-primary { background: var(--cta-bg); color: var(--cta-text); }
  .btn-primary:hover { background: var(--cta-hover); }
  .btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
  .btn-outline:hover { background: var(--surface-2); }
  .btn-sm { padding: 9px 16px; font-size: 13px; }

  input[type="text"], input[type="email"], input[type="tel"], input[type="password"], textarea {
    width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 2px;
    font-family: 'Inter', sans-serif; font-size: 14px; background: var(--surface); color: var(--text);
  }
  textarea { resize: vertical; min-height: 96px; }
  input::placeholder, textarea::placeholder { color: var(--text-faint); }
  input:focus, textarea:focus { border-color: var(--gold); }
  label.field-label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
  .field-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; display: none; }
  .field-error.show { display: block; }

  .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; color: var(--text-faint); }

  .view { display: none; }
  .view.active { display: block; animation: fade-in 0.35s ease; }
  .view.active[data-route="login"] { display: flex; }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

  .icon { color: var(--text); flex-shrink: 0; }
  .chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 2px; }
  .chip-available { color: var(--accent); background: var(--accent-soft); }
  .chip-reserved { color: var(--warn); background: var(--warn-soft); }
  .chip-new { color: var(--info); background: var(--info-soft); }

  table { border-collapse: collapse; width: 100%; }
  th, td { text-align: left; padding: 13px 14px; }
  th { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-faint); border-bottom: 1px solid var(--border); }
  td { font-size: 14px; border-bottom: 1px solid var(--border); }
  tbody tr:last-child td { border-bottom: none; }
  tbody tr:hover { background: var(--surface-2); }
  .num { font-variant-numeric: tabular-nums; }

  .projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
  .project-card { background: var(--surface); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; transition: transform 0.18s ease, box-shadow 0.18s ease; }
  .project-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20,20,26,0.1); }
  .project-photo { position: relative; height: 148px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
  .project-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
  .project-card:hover .project-photo img { transform: scale(1.045); }
  .project-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,26,0) 55%, rgba(20,20,26,0.55) 100%); }
  .project-photo .chip { position: absolute; top: 12px; right: 12px; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
  .project-photo .project-loc { position: absolute; left: 14px; bottom: 10px; z-index: 2; color: #fff; font-size: 12px; letter-spacing: 0.04em; opacity: 0.92; }
  .project-body { padding: 16px 18px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
  .project-name { font-family: 'Libre Caslon Display', serif; font-size: 17px; cursor: pointer; }
  .project-tags { font-size: 12.5px; color: var(--text-muted); }
  .project-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .project-stats .stat-label { font-size: 10px; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 3px; }
  .project-stats .stat-value { font-size: 13.5px; font-weight: 600; }
  .project-actions { display: flex; gap: 8px; margin-top: auto; }
  .project-actions .btn { flex: 1; }

  .modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,15,18,0.6); z-index: 100; align-items: center; justify-content: center; padding: 24px; animation: fade-in 0.15s ease; }
  .modal-backdrop.open { display: flex; }
  .modal-panel { background: var(--surface); border-radius: 4px; max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.35); }
  .modal-photo { position: relative; height: 220px; }
  .modal-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(20,20,26,0.55); border: none; color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .modal-body { padding: 26px 30px 30px 30px; }
  .modal-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
  .modal-stats > div { border: 1px solid var(--border); border-radius: 3px; padding: 12px 12px; }
  .modal-sicherheiten { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
  .modal-sicherheiten li { font-size: 13.5px; color: var(--text-muted); padding-left: 16px; position: relative; }
  .modal-sicherheiten li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

  .doc-row { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 3px; }
  .doc-row:hover { background: var(--surface-2); }
  .doc-row .doc-icon { width: 36px; height: 36px; border-radius: 3px; background: var(--surface-2); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .doc-row .doc-name { font-size: 14px; font-weight: 500; }
  .doc-row .doc-meta { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
  .doc-row .doc-download { margin-left: auto; flex-shrink: 0; }
  .dash-nav-link { transition: color 0.15s ease, border-color 0.15s ease; }

  .filter-chip {
    font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 500; padding: 7px 14px;
    border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
    cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .filter-chip:hover { background: var(--surface-2); }
  .filter-chip.active { background: var(--cta-bg); color: var(--cta-text); border-color: var(--cta-bg); }

  .position-row { display: flex; align-items: center; gap: 20px; padding: 18px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
  .position-row:last-child { border-bottom: none; }
  .position-photo { width: 64px; height: 64px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
  .position-stats { display: grid; grid-template-columns: repeat(5, minmax(78px, auto)); gap: 16px; margin-left: auto; }
  .position-stats .stat-label { font-size: 10px; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 3px; }
  .position-stats .stat-value { font-size: 13.5px; font-weight: 600; }

  .view.active[data-route="dev-login"] { display: flex; }

  .chip-review { color: var(--warn); background: var(--warn-soft); }
  .chip-paid { color: var(--gold); background: var(--gold-soft); }
  .chip-submitted { color: var(--info); background: var(--info-soft); }
  .chip-approved { color: var(--accent); background: var(--accent-soft); }
  .chip-rejected { color: var(--danger); background: var(--danger-soft); }

  /* Toggle switch (notification settings) */
  .switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
  .switch input { opacity: 0; width: 0; height: 0; position: absolute; }
  .switch-track { position: absolute; cursor: pointer; inset: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 22px; transition: 0.15s; }
  .switch-track::before { content: ""; position: absolute; height: 14px; width: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
  .switch input:checked + .switch-track { background: var(--gold); border-color: var(--gold); }
  .switch input:checked + .switch-track::before { transform: translateX(16px); }
  .toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .toggle-row:last-child { border-bottom: none; }
  .toggle-row-label { font-size: 13px; }
  .toggle-row-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

  /* Track record */
  .ref-card { background: var(--surface); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; box-shadow: var(--shadow-card); }
  .ref-card-photo { position: relative; height: 130px; background: var(--cta-bg); }
  .ref-card-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(35%); }
  .ref-card-photo .chip { position: absolute; top: 10px; left: 10px; z-index: 2; }
  .ref-card-body { padding: 16px 18px 18px 18px; }
  .ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
  .team-card { background: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 18px; box-shadow: var(--shadow-card); display: flex; gap: 12px; align-items: flex-start; }
  .team-avatar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold-line); color: var(--gold); display: flex; align-items: center; justify-content: center; font-family: 'Libre Caslon Display', serif; font-size: 15px; flex-shrink: 0; }
  .waterfall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
  .waterfall-item { background: var(--surface-2); border-radius: 3px; padding: 14px 16px; }
  .waterfall-item .eyebrow { font-size: 9.5px; margin-bottom: 6px; }
  .waterfall-item .val { font-size: 13.5px; font-weight: 600; line-height: 1.4; }

  /* Performance chart */
  .perf-chart-legend { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
  .perf-chart-legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); }
  .perf-chart-legend-swatch { width: 16px; height: 0; border-top: 2px solid; display: inline-block; }
  .perf-chart-wrap { position: relative; }
  .perf-chart-tooltip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: 11.5px; padding: 8px 11px; border-radius: 3px; line-height: 1.6; opacity: 0; transition: opacity 0.1s; white-space: nowrap; z-index: 5; transform: translate(-50%, -100%); top: -10px; }
  .perf-chart-tooltip.show { opacity: 1; }
  .perf-chart-tooltip strong { font-weight: 600; }

  /* Confidentiality placeholder (track record photos) */
  .ref-card-placeholder { position: relative; height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .ref-card-placeholder svg.watermark { position: absolute; opacity: 0.16; }
  .ref-card-placeholder .confid-label { position: absolute; bottom: 8px; left: 10px; right: 10px; font-size: 10px; color: rgba(255,255,255,0.85); letter-spacing: 0.02em; line-height: 1.4; }

  .stage-track { display: flex; align-items: center; }
  .stage-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; width: 108px; text-align: center; }
  .stage-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border); }
  .stage-step.done .stage-dot { background: var(--gold); border-color: var(--gold); }
  .stage-step.current .stage-dot { background: var(--surface); border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
  .stage-label { font-size: 10.5px; color: var(--text-faint); line-height: 1.3; }
  .stage-step.done .stage-label, .stage-step.current .stage-label { color: var(--text); font-weight: 500; }
  .stage-line { flex: 1; height: 2px; background: var(--border); margin: 0 -6px 20px -6px; min-width: 16px; }
  .stage-line.done { background: var(--gold-line); }

  .ticket-row { display: flex; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
  .ticket-row:last-child { border-bottom: none; }
  .ticket-name { font-size: 13.5px; font-weight: 500; min-width: 200px; flex: 1 1 200px; }

  .dropzone { border: 1.5px dashed var(--border); border-radius: 4px; padding: 32px 20px; text-align: center; background: var(--surface-2); }

  .pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }
  .pulse-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--accent); opacity: 0.5; animation: pulse-ring 1.8s ease-out infinite; }
  .pulse-dot.gold { background: var(--gold); }
  .pulse-dot.gold::after { background: var(--gold); }
  @keyframes pulse-ring { 0% { transform: scale(0.5); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }

  .call-row { border: 1px solid var(--border); border-radius: 3px; margin-bottom: 10px; overflow: hidden; transition: border-color 0.2s ease; }
  .call-row.flash { border-color: var(--gold-line); }
  .call-row-summary { display: flex; align-items: center; gap: 18px; padding: 14px 16px; cursor: pointer; flex-wrap: wrap; }
  .call-row-summary:hover { background: var(--surface-2); }
  .call-row-chevron { transition: transform 0.2s ease; color: var(--text-faint); flex-shrink: 0; margin-left: auto; }
  .call-row.open .call-row-chevron { transform: rotate(180deg); }
  .call-row-detail { display: none; padding: 4px 20px 22px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
  .call-row.open .call-row-detail { display: block; }
  .call-timeline { display: flex; align-items: flex-start; gap: 0; margin: 18px 0 6px 0; }
  .call-timeline-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; width: 130px; text-align: center; }
  .call-timeline-line { flex: 1; height: 2px; background: var(--border); margin: 9px -6px 0 -6px; min-width: 12px; }
  .call-timeline-line.done { background: var(--gold-line); }

  /* ===================== RESPONSIVE / MOBILE ===================== */
  @media (max-width: 900px) {
    .wrap { padding-left: 20px; padding-right: 20px; }

    [style*="grid-template-columns: repeat(4, minmax(0, 1fr))"],
    [style*="grid-template-columns: repeat(3, minmax(0, 1fr))"] {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .modal-stats { grid-template-columns: repeat(2, 1fr) !important; }
    .ref-stats { grid-template-columns: repeat(2, 1fr) !important; }
    .position-stats { grid-template-columns: repeat(3, minmax(66px, auto)) !important; gap: 10px !important; margin-left: 0 !important; margin-top: 10px; }
    .project-stats { grid-template-columns: repeat(2, 1fr) !important; }

    [style*="font-size: 54px"] { font-size: 36px !important; }
    [style*="font-size: 33px"] { font-size: 24px !important; }
    h1[style*="font-size: 30px"] { font-size: 24px !important; }

    .stage-track, .call-timeline { overflow-x: auto; padding-bottom: 4px; }

    .modal-panel { max-height: 92vh; }
    .modal-photo { height: 160px; }
  }

  @media (max-width: 560px) {
    [style*="grid-template-columns: repeat(4, minmax(0, 1fr))"],
    [style*="grid-template-columns: repeat(3, minmax(0, 1fr))"],
    [style*="grid-template-columns: repeat(2, minmax(0, 1fr))"] {
      grid-template-columns: 1fr !important;
    }
    .modal-stats, .ref-stats, .project-stats { grid-template-columns: 1fr !important; }
    .position-stats { grid-template-columns: repeat(2, minmax(60px, auto)) !important; }
    .modal-backdrop { padding: 12px; }
    .modal-body { padding: 20px 18px 24px 18px; }
  }

  @media (min-width: 1100px) {
    .tagline-desktop { display: block !important; }
  }
  /* ================================================================= */
  /* Seengen due-diligence data room */
  .dd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 6px; }
  .dd-table th { text-align: left; font-size: 10.5px; letter-spacing: 0.04em; color: var(--text-faint); font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  .dd-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
  .dd-table tr:last-child td { border-bottom: none; }
  .dd-table .num { font-variant-numeric: tabular-nums; }
  .dd-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em; }
  .dd-status-offen { background: var(--danger-soft); color: var(--danger); }
  .dd-status-teilweise { background: var(--warn-soft); color: var(--warn); }
  .dd-section-title { font-size: 14px; font-weight: 600; margin: 22px 0 4px 0; }
  .dd-section-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.6; }
  .dd-scroll { overflow-x: auto; }
  @media (max-width: 640px) {
    #seengen-dd-modal .modal-panel { max-width: 100%; }
  }

  /* Impressum: Hinweis auf die Agentur */
  .made-by { display: inline-flex; align-items: center; gap: 10px; margin: -8px 0 22px 0; font-size: 11.5px; color: var(--text-faint); opacity: 0.8; transition: opacity 0.15s; }
  .made-by:hover { opacity: 1; }
  .made-by img { display: block; height: 24px; width: auto; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .made-by img { filter: invert(1); } }
  :root[data-theme="dark"] .made-by img { filter: invert(1); }
