#dna-analys {
  --dna-navy: #082f49;
  --dna-teal: #0f7777;
  --dna-gold: #d9a323;
  --dna-ink: #17252d;
  --dna-soft: #edf7f5;
  --dna-line: #bedad7;
  --dna-warn: #9f1239;
  min-width: 0;
  overflow-x: clip;
}

#dna-analys .section-header {
  align-items: end;
}

#dna-analys .dna-layout {
  display: grid;
  gap: 14px;
}

#dna-analys .dna-intro-card {
  border: 1px solid var(--dna-line);
  border-left: 5px solid var(--dna-teal);
  border-radius: 6px;
  box-shadow: none;
  display: grid;
  gap: 12px;
  padding: 18px;
}

#dna-analys .dna-intro-card h3 {
  margin: 4px 0 6px;
}

#dna-analys .dna-lab-context {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto;
}

#dna-analys .dna-lab-context label,
#dna-analys .dna-lab-field {
  color: var(--dna-ink);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 5px;
}

#dna-analys .dna-lab-context select,
#dna-analys .dna-lab-field input,
#dna-analys .dna-lab-field select,
#dna-analys .dna-lab-field textarea,
#dna-analys .dna-lab-toolbar input,
#dna-analys .dna-lab-toolbar select {
  background: #fff;
  border: 1px solid #d6a84f;
  border-radius: 5px;
  color: var(--dna-ink);
  font: inherit;
  min-height: 42px;
  padding: 8px 10px;
  width: 100%;
}

#dna-analys .dna-lab-field textarea {
  min-height: 90px;
  resize: vertical;
}

#dna-analys .dna-lab-privacy {
  align-items: center;
  background: var(--dna-soft);
  border: 1px solid var(--dna-line);
  border-radius: 5px;
  color: #075d61;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 7px;
  min-height: 42px;
  padding: 8px 12px;
}

#dna-analys .dna-step-shell {
  max-width: 100%;
  min-width: 0;
}

#dna-analys .dna-step-tabs {
  background: var(--dna-navy);
  border-radius: 6px 6px 0 0;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(8, minmax(118px, 1fr));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 6px;
  scrollbar-width: thin;
}

#dna-analys .dna-step-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 5px;
  color: #fff;
  display: flex;
  gap: 7px;
  justify-content: flex-start;
  min-height: 56px;
  padding: 7px 8px;
  text-align: left;
}

#dna-analys .dna-step-button:hover,
#dna-analys .dna-step-button:focus-visible {
  border-color: var(--dna-gold);
  outline: 2px solid rgba(217, 163, 35, 0.2);
}

#dna-analys .dna-step-button.active {
  background: #fff;
  border-color: var(--dna-gold);
  color: var(--dna-navy);
}

#dna-analys .dna-step-number {
  align-items: center;
  background: var(--dna-teal);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 25px;
  font-size: 0.75rem;
  height: 25px;
  justify-content: center;
}

#dna-analys .dna-step-text {
  display: grid;
  font-size: 0.78rem;
  gap: 1px;
  line-height: 1.05;
}

#dna-analys .dna-step-text small {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.78;
}

#dna-analys .dna-step-panels {
  background: #fbfaf5;
  border: 1px solid var(--dna-line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  min-height: 460px;
  min-width: 0;
  padding: 14px;
}

#dna-analys .dna-step-panel {
  display: none;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

#dna-analys .dna-step-panel.active {
  display: grid;
}

#dna-analys .dna-lab-workspace {
  background: #fff;
  border: 1px solid var(--dna-line);
  border-radius: 6px;
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  max-width: 100%;
  min-width: 0;
  padding: 16px;
}

#dna-analys .dna-lab-heading {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

#dna-analys .dna-lab-heading h3,
#dna-analys .dna-lab-heading p {
  margin: 0;
}

#dna-analys .dna-lab-heading p {
  color: #52636b;
  font-size: 0.9rem;
  margin-top: 4px;
}

#dna-analys .dna-detective-case {
  border-top: 1px solid var(--dna-line);
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

#dna-analys .dna-detective-case:first-child {
  border-top: 0;
  padding-top: 0;
}

#dna-analys .dna-lab-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
}

#dna-analys .dna-lab-metric {
  background: var(--dna-soft);
  border: 1px solid var(--dna-line);
  border-radius: 5px;
  min-height: 74px;
  padding: 10px;
}

#dna-analys .dna-lab-metric span {
  color: #4b6167;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

#dna-analys .dna-lab-metric strong {
  color: var(--dna-teal);
  display: block;
  font-size: 1.55rem;
  margin-top: 4px;
}

#dna-analys .dna-lab-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.5fr);
}

#dna-analys .dna-lab-form {
  align-content: start;
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#dna-analys .dna-lab-form .wide,
#dna-analys .dna-lab-form .dna-lab-actions,
#dna-analys .dna-lab-form .dna-lab-status {
  grid-column: 1 / -1;
}

#dna-analys .dna-lab-actions,
#dna-analys .dna-lab-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#dna-analys .dna-lab-toolbar > * {
  flex: 1 1 150px;
}

#dna-analys .dna-lab-toolbar button {
  flex: 0 0 auto;
}

#dna-analys .dna-lab-status {
  color: #075d61;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 20px;
}

#dna-analys .dna-lab-status.error {
  color: var(--dna-warn);
}

#dna-analys .dna-lab-table-wrap {
  border: 1px solid var(--dna-line);
  border-radius: 5px;
  max-height: 520px;
  overflow: auto;
}

#dna-analys .dna-lab-table {
  border-collapse: collapse;
  font-size: 0.82rem;
  width: 100%;
}

#dna-analys .dna-lab-table th,
#dna-analys .dna-lab-table td {
  border-bottom: 1px solid #dbe8e6;
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

#dna-analys .dna-lab-table th {
  background: var(--dna-soft);
  color: #38545a;
  font-size: 0.7rem;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 2;
}

#dna-analys .dna-lab-table tr[data-lab-select] {
  cursor: pointer;
}

#dna-analys .dna-lab-table tr[data-lab-select]:hover,
#dna-analys .dna-lab-table tr.selected {
  background: #fff7d8;
}

#dna-analys .dna-lab-empty {
  border: 1px dashed #c8aa6a;
  border-radius: 5px;
  color: #546168;
  padding: 18px;
}

#dna-analys .dna-lab-badge {
  background: #e3efed;
  border-radius: 999px;
  color: #075d61;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

#dna-analys .dna-lab-badge.warn {
  background: #fff1c8;
  color: #8a3b0a;
}

#dna-analys .dna-chromosome-map {
  display: grid;
  gap: 6px;
}

#dna-analys .dna-chromosome-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr);
}

#dna-analys .dna-chromosome-row > strong {
  font-size: 0.72rem;
  text-align: right;
}

#dna-analys .dna-chromosome-track {
  background: #e8eceb;
  border: 1px solid #c7d3d1;
  border-radius: 4px;
  height: 22px;
  overflow: hidden;
  position: relative;
}

#dna-analys .dna-painted-segment {
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 3px;
  height: 100%;
  min-width: 3px;
  position: absolute;
  top: 0;
}

#dna-analys .dna-score {
  align-items: center;
  display: flex;
  gap: 8px;
}

#dna-analys .dna-score-bar {
  background: #dfe9e7;
  border-radius: 999px;
  flex: 1;
  height: 8px;
  overflow: hidden;
}

#dna-analys .dna-score-bar i {
  background: var(--dna-teal);
  display: block;
  height: 100%;
}

#dna-analys .dna-detective-steps {
  display: grid;
  gap: 8px;
}

#dna-analys .dna-detective-step {
  align-items: center;
  border: 1px solid var(--dna-line);
  border-radius: 5px;
  display: grid;
  gap: 10px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  padding: 9px;
}

#dna-analys .dna-detective-step > b {
  align-items: center;
  background: var(--dna-teal);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

#dna-analys .dna-lab-report-preview {
  border: 1px solid var(--dna-line);
  border-radius: 5px;
  min-height: 240px;
  padding: 20px;
}

#dna-analys .dna-lab-report-preview h4 {
  border-bottom: 2px solid var(--dna-teal);
  margin: 0 0 14px;
  padding-bottom: 8px;
}

#dna-analys .dna-lab-chart {
  border-bottom: 1px solid var(--dna-line);
  margin-bottom: 18px;
  padding-bottom: 18px;
}

#dna-analys .dna-lab-histogram {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  min-height: 150px;
}

#dna-analys .dna-lab-histogram > .dna-lab-empty {
  align-self: stretch;
  display: grid;
  grid-column: 1 / -1;
  min-width: 0;
  place-items: center;
  text-align: center;
}

#dna-analys .dna-histogram-column {
  align-items: center;
  display: grid;
  grid-template-rows: 22px 96px auto;
  height: 138px;
  justify-items: center;
}

#dna-analys .dna-histogram-column i {
  align-self: end;
  background: var(--dna-teal);
  border: 1px solid #075d61;
  border-radius: 4px 4px 0 0;
  display: block;
  min-height: 4px;
  width: min(54px, 80%);
}

#dna-analys .dna-histogram-column span {
  color: #465a60;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

#dna-analys .dna-lab-geo-plot {
  background-color: #edf5f3;
  background-image: linear-gradient(#d7e8e5 1px, transparent 1px), linear-gradient(90deg, #d7e8e5 1px, transparent 1px);
  background-size: 28px 28px;
  border: 1px solid var(--dna-line);
  border-radius: 5px;
  margin-bottom: 12px;
  min-height: 250px;
  overflow: hidden;
  position: relative;
}

#dna-analys .dna-geo-point {
  background: var(--dna-gold);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #075d61;
  height: 15px;
  padding: 0;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 15px;
}

#dna-analys .dna-geo-point span {
  background: #fff;
  border: 1px solid var(--dna-line);
  border-radius: 3px;
  display: none;
  font-size: 0.7rem;
  left: 12px;
  padding: 4px 6px;
  position: absolute;
  top: -8px;
  white-space: nowrap;
  z-index: 2;
}

#dna-analys .dna-geo-point:hover span,
#dna-analys .dna-geo-point:focus-visible span {
  display: block;
}

@media (max-width: 1180px) {
  #dna-analys .dna-step-tabs {
    grid-template-columns: repeat(4, minmax(145px, 1fr));
  }

  #dna-analys .dna-lab-metrics {
    grid-template-columns: repeat(3, minmax(105px, 1fr));
  }
}

@media (max-width: 760px) {
  #dna-analys .dna-intro-card,
  #dna-analys .dna-step-panels,
  #dna-analys .dna-lab-workspace {
    max-width: 100%;
    min-width: 0;
  }

  #dna-analys .dna-lab-context,
  #dna-analys .dna-lab-grid,
  #dna-analys .dna-lab-form {
    grid-template-columns: 1fr;
  }

  #dna-analys .dna-lab-form .wide,
  #dna-analys .dna-lab-form .dna-lab-actions,
  #dna-analys .dna-lab-form .dna-lab-status {
    grid-column: 1;
  }

  #dna-analys .dna-step-tabs {
    display: flex;
    max-width: 100%;
    min-width: 0;
  }

  #dna-analys .dna-step-button {
    flex: 0 0 148px;
    min-width: 0;
  }

  #dna-analys .dna-lab-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dna-analys .dna-lab-histogram {
    gap: 4px;
    grid-template-columns: repeat(3, minmax(70px, 1fr));
  }

  #dna-analys .dna-lab-table-wrap,
  #dna-analys .dna-lab-report-preview,
  #dna-analys .dna-lab-geo-plot,
  #dna-analys .dna-lab-chart {
    max-width: 100%;
    min-width: 0;
  }
}

@media print {
  #dna-analys .section-header,
  #dna-analys .dna-intro-card,
  #dna-analys .dna-step-tabs,
  #dna-analys .dna-lab-actions,
  #dna-analys .dna-lab-toolbar {
    display: none !important;
  }

  #dna-analys .dna-step-panels,
  #dna-analys .dna-step-panel.active,
  #dna-analys .dna-lab-workspace {
    border: 0;
    display: block;
    padding: 0;
  }
}
