:root {
  --dm-bg: #f8fafc;
  --dm-surface: #ffffff;
  --dm-surface-soft: #f9fafb;
  --dm-surface-muted: #f3f4f6;
  --dm-border: #e5e7eb;
  --dm-border-strong: #d1d5db;
  --dm-text: #111827;
  --dm-text-soft: #374151;
  --dm-text-muted: #6b7280;
  --dm-primary: #2563eb;
  --dm-primary-dark: #1d4ed8;
  --dm-primary-soft: #eff6ff;
  --dm-secondary: #111827;
  --dm-success: #047857;
  --dm-warning: #b45309;
  --dm-danger: #b91c1c;
  --dm-score-0: #fde8ee;
  --dm-score-1: #fdecec;
  --dm-score-2: #fff0df;
  --dm-score-3: #fff8d8;
  --dm-score-4: #e8f7ef;
  --dm-score-5: #dff6e8;
  --dm-shadow-primary: 0 6px 18px rgba(37, 99, 235, 0.18);
  --dm-shadow-dark: 0 6px 18px rgba(15, 23, 42, 0.14);
  --dm-shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.06);
  --dm-radius-xl: 14px;
  --dm-radius-lg: 12px;
  --dm-radius-md: 10px;
  --dm-radius-sm: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: var(--dm-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--dm-border);
  background: #ffffff;
  color: var(--dm-text);
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--dm-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

textarea {
  resize: vertical;
  min-height: 76px;
}

.dm-shell {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dm-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.dm-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.dm-brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--dm-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex: 0 0 auto;
  box-shadow: var(--dm-shadow-primary);
}

.dm-eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--dm-primary);
}

.dm-topbar h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dm-text);
}

.dm-subline {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--dm-text-muted);
  line-height: 1.5;
  max-width: 920px;
}

.dm-top-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dm-btn,
.dm-upload-btn {
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background: var(--dm-primary);
  color: #ffffff;
  box-shadow: var(--dm-shadow-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.dm-btn:hover,
.dm-upload-btn:hover,
.dm-icon-btn:hover,
.dm-wizard-step:hover {
  transform: scale(1.02);
}

.dm-btn:active,
.dm-upload-btn:active,
.dm-icon-btn:active,
.dm-wizard-step:active {
  transform: scale(0.98);
}

.dm-btn:focus-visible,
.dm-upload-btn:focus-visible,
.dm-icon-btn:focus-visible,
.dm-wizard-step:focus-visible {
  outline: 2px solid var(--dm-primary-dark);
  outline-offset: 2px;
}

.dm-btn:disabled,
.dm-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dm-btn-primary {
  background: var(--dm-primary);
  color: #ffffff;
}

.dm-btn-danger {
  background: var(--dm-secondary);
  color: #ffffff;
  box-shadow: var(--dm-shadow-dark);
}

.dm-btn-block,
.dm-upload-btn {
  width: 100%;
}

.dm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dm-kpi-card,
.dm-panel,
.dm-vendor-card,
.dm-card,
.dm-scenario-card {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-radius: 12px;
}

.dm-kpi-card {
  padding: 14px 16px;
}

.dm-kpi-label {
  display: block;
  font-size: 0.82rem;
  color: var(--dm-text-muted);
}

.dm-kpi-value {
  display: block;
  margin-top: 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dm-text);
}

.dm-kpi-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--dm-text-soft);
  line-height: 1.45;
}

.dm-main-grid {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
}

.dm-sidebar,
.dm-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.dm-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
}

.dm-panel {
  padding: 16px;
  min-width: 0;
}

.dm-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.dm-section-head h2,
.dm-panel h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dm-text);
}

.dm-section-copy {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--dm-text-muted);
  line-height: 1.5;
}

.dm-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--dm-primary-soft);
  border: 1px solid #dbeafe;
  color: var(--dm-primary);
  font-size: 0.82rem;
  font-weight: 600;
}

.dm-form-grid,
.dm-vendor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dm-field,
.dm-inline-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dm-field span,
.dm-inline-field span,
.dm-card-label {
  font-size: 0.8rem;
  color: var(--dm-text-muted);
}

.dm-field-full {
  grid-column: 1 / -1;
}

.dm-action-stack,
.dm-stack,
.dm-summary-panel,
.dm-detail-panel,
.dm-scenario-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-message {
  min-height: 18px;
  font-size: 0.8rem;
  color: var(--dm-success);
  margin-top: 2px;
}

.dm-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--dm-border);
  border-radius: 10px;
  background: #ffffff;
}

.dm-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.dm-table th,
.dm-table td {
  border: 1px solid var(--dm-border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.dm-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--dm-surface-soft);
  font-weight: 600;
  color: var(--dm-text-soft);
}

.dm-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dm-inline-field {
  min-width: 180px;
}

.dm-matrix-wrap {
  max-height: 840px;
}

.dm-matrix-table {
  min-width: 1180px;
}

.dm-matrix-table .sticky-left,
.dm-matrix-table .sticky-left-2,
.dm-matrix-table .sticky-left-3 {
  position: sticky;
  background: #ffffff;
  z-index: 3;
}

.dm-matrix-table .sticky-left {
  left: 0;
  min-width: 240px;
}

.dm-matrix-table .sticky-left-2 {
  left: 240px;
  min-width: 96px;
}

.dm-matrix-table .sticky-left-3 {
  left: 336px;
  min-width: 88px;
}

.dm-score-input {
  width: 72px;
  text-align: center;
  font-weight: 600;
  padding: 6px 8px;
}

.dm-score-input.score-0 {
  background: var(--dm-score-0);
}

.dm-score-input.score-1 {
  background: var(--dm-score-1);
}

.dm-score-input.score-2 {
  background: var(--dm-score-2);
}

.dm-score-input.score-3 {
  background: var(--dm-score-3);
}

.dm-score-input.score-4 {
  background: var(--dm-score-4);
}

.dm-score-input.score-5 {
  background: var(--dm-score-5);
}

.dm-rule-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dm-rule {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  border: 1px solid var(--dm-border);
  background: #f9fafb;
  color: var(--dm-text-soft);
}

.dm-rule.is-mandatory {
  background: #eff6ff;
  border-color: #dbeafe;
  color: var(--dm-primary);
}

.dm-rule.is-ko {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--dm-danger);
}

.dm-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.dm-legend {
  min-width: 42px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 1px solid var(--dm-border);
  color: var(--dm-text);
  font-size: 0.82rem;
}

.dm-score-0 {
  background: var(--dm-score-0);
}

.dm-score-1 {
  background: var(--dm-score-1);
}

.dm-score-2 {
  background: var(--dm-score-2);
}

.dm-score-3 {
  background: var(--dm-score-3);
}

.dm-score-4 {
  background: var(--dm-score-4);
}

.dm-score-5 {
  background: var(--dm-score-5);
}

.dm-legend-copy {
  font-size: 0.8rem;
  color: var(--dm-text-muted);
}

.dm-vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.dm-vendor-card,
.dm-card,
.dm-scenario-card {
  padding: 12px;
  background: #ffffff;
}

.dm-vendor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.dm-vendor-title {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dm-text);
}

.dm-vendor-title:focus {
  border: none;
  box-shadow: none;
}

.dm-vendor-actions {
  display: flex;
  gap: 8px;
}

.dm-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dm-text-soft);
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.dm-icon-btn-danger {
  color: var(--dm-danger);
}

.dm-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dm-triple-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dm-rank-badge {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dm-primary-soft);
  border: 1px solid #dbeafe;
  color: var(--dm-primary);
  font-weight: 700;
  font-size: 0.82rem;
}

.dm-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dm-bar {
  position: relative;
  flex: 1;
  min-width: 120px;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.dm-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--dm-primary);
}

.dm-small {
  font-size: 0.82rem;
  color: var(--dm-text-muted);
}

.dm-ok {
  color: var(--dm-success);
}

.dm-warn {
  color: var(--dm-warning);
}

.dm-bad {
  color: var(--dm-danger);
}

.dm-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dm-text);
}

.dm-card p,
.dm-scenario-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dm-text-soft);
  line-height: 1.55;
}

.dm-list {
  margin: 0;
  padding-left: 18px;
  color: var(--dm-text-soft);
  line-height: 1.5;
}

.dm-list li + li {
  margin-top: 4px;
}

.dm-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dm-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.dm-breakdown-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.dm-breakdown-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--dm-primary);
}

.dm-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dm-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dm-detail-kpis {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dm-mini-kpi {
  min-width: 110px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--dm-border);
}

.dm-mini-kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  color: var(--dm-text);
}

.dm-wizard-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dm-wizard-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.dm-wizard-progress > span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--dm-primary);
  transition: width 0.2s ease;
}

.dm-wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dm-wizard-step {
  border: 1px solid var(--dm-border);
  background: #ffffff;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  color: var(--dm-text);
  min-height: 72px;
  box-shadow: none;
}

.dm-wizard-step.is-active {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.dm-wizard-step-no {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  color: var(--dm-text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.dm-wizard-step.is-active .dm-wizard-step-no {
  background: var(--dm-primary);
  color: #ffffff;
}

.dm-wizard-step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dm-wizard-step-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dm-text);
}

.dm-wizard-step-text small {
  font-size: 0.78rem;
  color: var(--dm-text-muted);
}

.dm-wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.dm-wizard-panel {
  display: none;
}

.dm-wizard-panel.is-active {
  display: block;
}

.dm-panel-inline {
  padding: 0;
  border: none;
  background: transparent;
}

.dm-panel-inline-detail {
  margin-top: 16px;
}


.dm-action-toolbar-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dm-action-toolbar-head {
  margin-bottom: 0;
}

.dm-action-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dm-action-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--dm-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.dm-action-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--dm-text-muted);
}

.dm-action-group-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dm-action-group .dm-btn,
.dm-action-group .dm-upload-btn {
  width: auto;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}

.dm-message-toolbar {
  margin-top: 0;
}

@media (min-width: 992px) {
  .dm-shell {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin-left: calc(50% - 50vw + 12px);
    margin-right: calc(50% - 50vw + 12px);
  }
}

@media (max-width: 1350px) {
  .dm-action-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .dm-main-grid {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .dm-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dm-triple-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .dm-main-grid,
  .dm-dual-grid,
  .dm-detail-grid,
  .dm-action-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .dm-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .dm-sidebar {
    position: static;
    top: auto;
  }

  .dm-wizard-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dm-shell {
    padding: 18px 16px;
  }

  .dm-topbar h1 {
    font-size: 1.2rem;
  }

  .dm-kpi-grid,
  .dm-form-grid,
  .dm-vendor-form,
  .dm-vendor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dm-table {
    min-width: 760px;
  }

  .dm-matrix-table .sticky-left,
  .dm-matrix-table .sticky-left-2,
  .dm-matrix-table .sticky-left-3 {
    position: static;
  }

  .dm-wizard-nav {
    flex-direction: column;
  }

  .dm-wizard-nav .dm-btn {
    width: 100%;
  }

  .dm-action-group {
    padding: 10px;
  }

  .dm-action-group-buttons {
    flex-direction: column;
  }

  .dm-action-group .dm-btn,
  .dm-action-group .dm-upload-btn {
    width: 100%;
  }
}

@media print {
  .dm-action-toolbar-panel,
  .dm-message-toolbar {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #111827;
  }

  .dm-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .dm-topbar,
  .dm-panel,
  .dm-kpi-card,
  .dm-vendor-card,
  .dm-card,
  .dm-scenario-card {
    background: #ffffff;
    color: #111827;
    box-shadow: none;
    border-color: #d1d5db;
  }

  .dm-btn,
  .dm-upload-btn,
  .dm-icon-btn,
  .dm-filter-row,
  .dm-top-actions,
  .dm-wizard-nav,
  .dm-wizard-steps,
  #appMessage {
    display: none !important;
  }

  input,
  select,
  textarea {
    color: #111827;
    border-color: #d1d5db;
    background: #ffffff;
    box-shadow: none;
  }

  .dm-main-grid,
  .dm-dual-grid,
  .dm-triple-grid,
  .dm-detail-grid {
    grid-template-columns: 1fr;
  }

  .dm-wizard-panel {
    display: block !important;
  }

  .dm-wizard-panel[hidden] {
    display: block !important;
  }
}

.dm-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dm-template-btn {
  border: 1px solid var(--dm-border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--dm-text);
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dm-template-btn:hover {
  border-color: #bfdbfe;
  box-shadow: var(--dm-shadow-soft);
}

.dm-template-btn:focus-visible {
  outline: 2px solid var(--dm-primary-dark);
  outline-offset: 2px;
}

.dm-template-note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--dm-text-muted);
}

.dm-validation-list {
  margin: 0;
  padding-left: 18px;
  color: var(--dm-text-soft);
}

.dm-validation-list li + li {
  margin-top: 4px;
}

.dm-note-ok {
  color: var(--dm-success);
}

.dm-note-warn {
  color: var(--dm-warning);
}

.dm-note-bad {
  color: var(--dm-danger);
}

.dm-card + .dm-card {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .dm-template-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Executive orientation */
.dm-topbar {
  padding: 8px 2px 0;
}

.dm-subline {
  font-size: 0.96rem;
  max-width: 980px;
}

.dm-kpi-card,
.dm-panel,
.dm-vendor-card,
.dm-card,
.dm-scenario-card {
  box-shadow: var(--dm-shadow-soft);
}

.dm-kpi-card {
  padding: 16px 18px;
}

.dm-kpi-value {
  font-size: 1.35rem;
}

.dm-exec-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dm-exec-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--dm-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--dm-shadow-soft);
}

.dm-exec-step {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--dm-primary-soft);
  border: 1px solid #dbeafe;
  color: var(--dm-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 auto;
}

.dm-exec-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: var(--dm-text);
}

.dm-exec-card p {
  margin: 0;
  color: var(--dm-text-soft);
  line-height: 1.5;
  font-size: 0.88rem;
}

.dm-sidebar .dm-panel:first-child {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.dm-template-btn,
.dm-wizard-step,
.dm-action-group,
.dm-scenario-card {
  box-shadow: var(--dm-shadow-soft);
}

.dm-wizard-step {
  min-height: 84px;
}

.dm-wizard-step-text strong {
  line-height: 1.25;
}

.dm-rating-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dm-rating-hint span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--dm-surface-soft);
  border: 1px solid var(--dm-border);
  color: var(--dm-text-soft);
  font-size: 0.8rem;
}

.dm-legend {
  min-width: auto;
  padding: 4px 10px;
}

.dm-card h3,
.dm-panel h2,
.dm-section-head h2 {
  letter-spacing: 0;
}

.dm-summary-panel .dm-card:first-child {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.dm-summary-panel .dm-card:first-child h3 {
  color: var(--dm-primary-dark);
}

.dm-summary-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--dm-primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.dm-emphasis {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--dm-text);
}

.dm-decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dm-note-list {
  margin: 0;
  padding-left: 18px;
  color: var(--dm-text-soft);
  line-height: 1.5;
}

.dm-note-list li + li {
  margin-top: 4px;
}

@media (max-width: 1200px) {
  .dm-exec-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dm-decision-grid {
    grid-template-columns: 1fr;
  }

  .dm-rating-hint {
    flex-direction: column;
  }
}

@media print {
  .dm-exec-rail {
    grid-template-columns: 1fr;
  }
}


/* Executive v2 usability refinements */
.dm-vendor-actions .dm-icon-btn {
  width: auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.dm-vendor-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dm-top-actions {
  align-items: stretch;
}

.dm-top-actions .dm-btn {
  min-height: 38px;
}

.dm-action-group-title {
  letter-spacing: 0.01em;
}

.dm-card-label {
  font-weight: 600;
}

@media (max-width: 640px) {
  .dm-vendor-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dm-vendor-actions .dm-icon-btn {
    flex: 0 0 auto;
  }
}


/* v3: remove logic-button row, base text 15px, linksbündig */
body,
.dm-shell,
.dm-panel,
.dm-kpi-card,
.dm-vendor-card,
.dm-card,
.dm-scenario-card,
.dm-table th,
.dm-table td,
.dm-field span,
.dm-inline-field span,
.dm-card-label,
.dm-chip,
.dm-btn,
.dm-upload-btn,
.dm-template-btn,
.dm-small,
.dm-list,
.dm-list li,
.dm-section-copy,
.dm-subline,
.dm-kpi-label,
.dm-kpi-meta,
.dm-message,
.dm-legend-copy,
.dm-rule,
.dm-wizard-step-text strong,
.dm-wizard-step-text small,
.dm-vendor-title,
input,
select,
textarea,
button,
a,
label,
p,
span,
small,
strong,
li,
td,
th {
  font-size: 15px !important;
}

body,
.dm-shell,
.dm-panel,
.dm-kpi-card,
.dm-vendor-card,
.dm-card,
.dm-scenario-card,
.dm-section-head,
.dm-table th,
.dm-table td,
.dm-wizard-step,
.dm-wizard-step-text,
.dm-field,
.dm-inline-field,
.dm-breakdown-item,
.dm-breakdown-row,
.dm-detail-top,
.dm-summary-panel,
.dm-detail-panel {
  text-align: left;
}

.dm-topbar {
  align-items: flex-start;
}

.dm-brand {
  width: 100%;
}

.dm-subline {
  max-width: 1200px;
}

.dm-top-actions {
  display: none !important;
}
/* Unified headline rhythm across global and page-specific CSS. */
#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4,
#main-content h5,
#main-content h6,
.hero-heading,
.hero-heading-h1,
.hero-heading-h1-services,
.hero-heading-h1-blog,
.hero-heading-h1-white,
.hero-heading-h1-black,
.title-one h2,
.title-two h2,
.title-three h2,
.title-four h2,
.custom-h2,
.blog-h2,
.headline-strong,
.dropdown-headline,
.pitch-title,
.pitch-sectiontitle,
.partnership-title,
.imprint-title,
.cart-pitch-title,
.role-jump-head h2,
.dach-flow-copy h2,
.x25-workcard-focus h2,
.mcHpTitle,
.mcHpHeader h2,
.pg-head h3 {
  letter-spacing: 0 !important;
  word-break: normal;
}

#main-content h1,
.hero-heading,
.hero-heading-h1,
.hero-heading-h1-services,
.hero-heading-h1-blog,
.hero-heading-h1-white,
.hero-heading-h1-black {
  line-height: 1.04 !important;
}

#main-content h2,
.title-one h2,
.title-two h2,
.title-three h2,
.title-four h2,
.custom-h2,
.blog-h2,
.headline-strong,
.pitch-title,
.partnership-title,
.imprint-title,
.cart-pitch-title,
.role-jump-head h2,
.dach-flow-copy h2,
.x25-workcard-focus h2,
.mcHpTitle,
.mcHpHeader h2 {
  line-height: 1.1 !important;
}

#main-content h3,
.dropdown-headline,
.pitch-sectiontitle,
.pg-head h3 {
  line-height: 1.16 !important;
}

#main-content h4 {
  line-height: 1.22 !important;
}

#main-content h5 {
  line-height: 1.28 !important;
}

#main-content h6 {
  line-height: 1.34 !important;
}

@media (max-width: 767.98px) {
  #main-content h1,
  #main-content h2,
  #main-content h3,
  #main-content h4,
  #main-content h5,
  #main-content h6,
  .hero-heading,
  .hero-heading-h1,
  .hero-heading-h1-services,
  .hero-heading-h1-blog,
  .hero-heading-h1-white,
  .hero-heading-h1-black,
  .title-one h2,
  .title-two h2,
  .title-three h2,
  .title-four h2,
  .custom-h2,
  .blog-h2,
  .headline-strong,
  .dropdown-headline,
  .pitch-title,
  .pitch-sectiontitle,
  .partnership-title,
  .imprint-title,
  .cart-pitch-title,
  .role-jump-head h2,
  .dach-flow-copy h2,
  .x25-workcard-focus h2,
  .mcHpTitle,
  .mcHpHeader h2,
  .pg-head h3 {
    max-width: 100% !important;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    text-wrap: balance;
  }

  #main-content h1,
  .hero-heading,
  .hero-heading-h1,
  .hero-heading-h1-services,
  .hero-heading-h1-blog,
  .hero-heading-h1-white,
  .hero-heading-h1-black {
    line-height: 1.08 !important;
  }

  #main-content h2,
  .title-one h2,
  .title-two h2,
  .title-three h2,
  .title-four h2,
  .custom-h2,
  .blog-h2,
  .headline-strong,
  .pitch-title,
  .partnership-title,
  .imprint-title,
  .cart-pitch-title,
  .role-jump-head h2,
  .dach-flow-copy h2,
  .x25-workcard-focus h2,
  .mcHpTitle,
  .mcHpHeader h2 {
    line-height: 1.12 !important;
  }

  #main-content h3,
  .dropdown-headline,
  .pitch-sectiontitle,
  .pg-head h3 {
    line-height: 1.18 !important;
  }

  #main-content h4 {
    line-height: 1.24 !important;
  }

  #main-content h5 {
    line-height: 1.3 !important;
  }

  #main-content h6 {
    line-height: 1.36 !important;
  }

  @supports (text-wrap: pretty) {
    #main-content h1,
    #main-content h2,
    #main-content h3,
    #main-content h4,
    #main-content h5,
    #main-content h6,
    .hero-heading,
    .hero-heading-h1,
    .hero-heading-h1-services,
    .hero-heading-h1-blog,
    .hero-heading-h1-white,
    .hero-heading-h1-black,
    .title-one h2,
    .title-two h2,
    .title-three h2,
    .title-four h2,
    .custom-h2,
    .blog-h2,
    .headline-strong,
    .dropdown-headline,
    .pitch-title,
    .pitch-sectiontitle,
    .partnership-title,
    .imprint-title,
    .cart-pitch-title,
    .role-jump-head h2,
    .dach-flow-copy h2,
    .x25-workcard-focus h2,
    .mcHpTitle,
    .mcHpHeader h2,
    .pg-head h3 {
      text-wrap: pretty;
    }
  }
}