.blast-page {
  max-width: 1600px;
}

.blast-step {
  color: var(--atlas-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.blast-panel {
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
}

.blast-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.blast-section-heading h2,
.blast-notes h2 {
  font-size: 1.35rem;
  margin: 0;
}

.blast-sequence-summary {
  background: var(--atlas-tint);
  border-radius: 999px;
  color: var(--atlas-accent-deep);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: min(52%, 390px);
  padding: 0.35rem 0.7rem;
  text-align: right;
  white-space: normal;
}

.blast-query {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  min-height: 190px;
  resize: vertical;
}

.blast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.blast-message {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: 7px;
  color: #664d03;
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
}

.blast-progress-panel .progress {
  height: 0.65rem;
}

.blast-progress-panel .progress-bar {
  background-color: #2d7187;
  transition: width 180ms ease;
}

.blast-progress-message {
  color: #64737a;
  margin: 0.7rem 0 0;
}

.blast-results-heading {
  align-items: flex-end;
}

.blast-result-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.blast-result-controls label {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}

.blast-result-controls select {
  min-width: 92px;
}

.blast-interpretation {
  background: rgba(50, 106, 125, 0.075);
  border-left: 3px solid #397b91;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
}

.blast-table-wrap {
  border: 1px solid rgba(33, 55, 67, 0.12);
  border-radius: 8px;
}

.blast-results-table {
  font-size: 0.82rem;
  margin-bottom: 0;
  min-width: 1180px;
  table-layout: fixed;
  width: 100%;
}

.blast-results-table thead th {
  background: rgba(50, 106, 125, 0.075);
  border-bottom-width: 1px;
  white-space: nowrap;
}

.blast-results-table td {
  overflow-wrap: anywhere;
  vertical-align: middle;
  white-space: normal;
}

.blast-results-table small {
  color: #718087;
}

.blast-results-table th:nth-child(1) { width: 52px; }
.blast-results-table th:nth-child(2) { width: 105px; }
.blast-results-table th:nth-child(3) { width: 330px; }
.blast-results-table th:nth-child(4) { width: 65px; }
.blast-results-table th:nth-child(5) { width: 78px; }
.blast-results-table th:nth-child(6) { width: 82px; }
.blast-results-table th:nth-child(7),
.blast-results-table th:nth-child(8) { width: 86px; }
.blast-results-table th:nth-child(9) { width: 95px; }
.blast-results-table th:nth-child(10) { width: 78px; }

.blast-rank,
.blast-number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.blast-annotation {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.blast-annotation-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.45rem;
  margin-top: 0.2rem;
  max-width: 100%;
}

.blast-annotation-code {
  display: inline;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.blast-detail-button {
  padding-left: 0;
  padding-right: 0;
}

.blast-alignment-details {
  border-top: 1px solid rgba(33, 55, 67, 0.14);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.blast-alignment-heading h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  overflow-wrap: anywhere;
}

.blast-alignment-heading p {
  color: #65777f;
  font-size: 0.85rem;
}

.blast-alignment-details pre {
  background: #101a1f;
  border-radius: 8px;
  color: #e3eef1;
  font-size: 0.78rem;
  line-height: 1.55;
  max-height: 520px;
  overflow: auto;
  padding: 1rem;
}

.blast-note-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.blast-note-grid h3 {
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}

.blast-note-grid p {
  color: #5f6f76;
  font-size: 0.9rem;
  margin: 0;
}

.blast-database-version {
  border-top: 1px solid rgba(33, 55, 67, 0.12);
  color: #66777e;
  font-family: SFMono-Regular, Consolas, monospace;
  font-size: 0.76rem;
  margin: 1.35rem 0 0;
  padding-top: 0.9rem;
}

body.dark-mode .blast-step,
body.dark-mode .blast-sequence-summary {
  color: #87c4d5;
}

body.dark-mode .blast-sequence-summary,
body.dark-mode .blast-interpretation,
body.dark-mode .blast-results-table thead th {
  background: rgba(92, 175, 199, 0.13);
}

body.dark-mode .blast-query {
  background: #0d181c;
  border-color: #3a5059;
  color: #e5eff2;
}

body.dark-mode .blast-message {
  background: #3a3218;
  border-color: #665a28;
  color: #fff0b3;
}

body.dark-mode .blast-table-wrap,
body.dark-mode .blast-alignment-details,
body.dark-mode .blast-database-version {
  border-color: rgba(210, 231, 238, 0.16);
}

body.dark-mode .blast-results-table {
  color: #dce9ed;
}

body.dark-mode .blast-results-table th,
body.dark-mode .blast-results-table td {
  border-color: rgba(210, 231, 238, 0.16);
}

body.dark-mode .blast-results-table.table-hover tbody tr:hover {
  background: rgba(92, 175, 199, 0.1);
  color: #f2fbfd;
}

body.dark-mode .blast-detail-button {
  color: #9ec9d5;
}

body.dark-mode .blast-note-grid p,
body.dark-mode .blast-results-table small,
body.dark-mode .blast-progress-message,
body.dark-mode .blast-alignment-heading p,
body.dark-mode .blast-database-version {
  color: #a7b9bf;
}

@media (max-width: 767.98px) {
  .blast-section-heading,
  .blast-results-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .blast-note-grid {
    grid-template-columns: 1fr;
  }

  .blast-result-controls {
    width: 100%;
  }
}
