.hermes-body {
  background: #f6f8fb;
}

.hermes-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 106px 28px 28px;
}

.hermes-command {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 22px;
}

.hermes-command h1 {
  font-size: 32px;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.hermes-command p {
  color: #475467;
  margin: 0;
}

.run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hermes-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
}

.hermes-panel {
  background: #ffffff;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  padding: 18px;
}

.source-picker-fieldset {
  background: #f9fbfd;
}

.source-picker {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.source-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 20px 1fr;
  min-height: 84px;
  padding: 12px;
}

.source-card.selected {
  border-color: #7aa7d9;
  box-shadow: inset 0 0 0 1px #7aa7d9;
}

.source-card.connected {
  background: #effaf4;
  border-color: #b8e6c8;
  box-shadow: none;
}

.source-card input {
  height: 18px;
  width: 18px;
}

.source-card strong,
.source-card small {
  display: block;
}

.source-card small {
  color: #667085;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 4px;
}

.tool-list {
  display: grid;
  gap: 10px;
}

.planned-source {
  background: #f8fafc;
  color: #475467;
}

.request-source-panel {
  display: grid;
  gap: 12px;
}

.request-source-panel label {
  color: #344054;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.request-source-panel input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  min-height: 42px;
  padding: 8px 10px;
}

.request-source-list {
  display: grid;
  gap: 8px;
}

.request-source-row {
  align-items: center;
  background: #f9fbfd;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.request-source-row strong,
.request-source-row small {
  display: block;
}

.request-source-row small {
  color: #667085;
  font-weight: 800;
}

.connection-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  background: #f9fbfd;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #667085;
  font-weight: 800;
  margin: 0;
  padding: 14px;
}

.readiness-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.connect-next-panel {
  align-items: center;
  background: #f2f7fc;
  border: 1px solid #c9dced;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin-bottom: 12px;
  padding: 13px;
}

.connect-next-panel strong,
.connect-next-panel small {
  display: block;
}

.connect-next-panel small {
  color: #536579;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 3px;
}

.sequence-progress {
  border: 1px solid #d9e5ef;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
}

.sequence-progress[hidden] {
  display: none;
}

.sequence-progress > div strong,
.sequence-progress > div small {
  display: block;
}

.sequence-progress > div small {
  color: #667085;
  font-size: 13px;
  font-weight: 750;
  margin-top: 2px;
}

.sequence-progress ol {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.sequence-progress li {
  align-items: start;
  background: #f8fafc;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  grid-template-columns: 24px 1fr;
  min-width: 0;
  padding: 9px;
}

.sequence-progress li > span {
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  color: #344054;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.sequence-progress li strong,
.sequence-progress li small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.sequence-progress li strong {
  color: #102a43;
  font-size: 13px;
}

.sequence-progress li small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.sequence-progress li.current {
  background: #eef6ff;
  border-color: #9ac7f7;
}

.sequence-progress li.current > span {
  background: #14518f;
  color: #ffffff;
}

.sequence-progress li.done {
  background: #effaf4;
  border-color: #b8e6c8;
}

.sequence-progress li.done > span {
  background: #127333;
  color: #ffffff;
}

.sequence-progress li.waiting {
  background: #fff8e9;
  border-color: #f0d391;
}

.sequence-progress li.waiting > span {
  background: #8a5a00;
  color: #ffffff;
}

.readiness-row {
  align-items: center;
  background: #fff8e9;
  border: 1px solid #f0d391;
  border-radius: 8px;
  color: #5f4300;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 11px;
}

.readiness-row.ready {
  background: #effaf4;
  border-color: #b8e6c8;
  color: #096d32;
}

.readiness-row span,
.readiness-row strong {
  font-size: 13px;
}

.tool-row,
.check-row {
  align-items: center;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 20px 1fr;
  padding: 12px;
}

.connection-card {
  align-items: center;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  padding: 12px;
}

.connection-card.connected {
  background: #effaf4;
  border-color: #b8e6c8;
}

.connection-card.not-ready {
  background: #fff8e9;
  border-color: #f0d391;
}

.connection-card strong,
.connection-card small {
  display: block;
}

.connection-card small {
  color: #667085;
  font-weight: 700;
  margin-top: 3px;
}

.connect-button {
  min-width: 112px;
  white-space: nowrap;
}

.connect-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.tool-row input,
.check-row input {
  height: 18px;
  width: 18px;
}

.tool-row strong,
.tool-row small {
  display: block;
}

.tool-row small {
  color: #667085;
  font-weight: 700;
  margin-top: 3px;
}

.panel-title h2 {
  font-size: 24px;
  margin: 0;
}

.brief-summary {
  color: #344054;
  line-height: 1.5;
}

.priority-list {
  display: grid;
  gap: 10px;
}

.priority-card {
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  padding: 14px;
}

.priority-card strong,
.priority-card small {
  display: block;
}

.priority-card small,
.priority-card p {
  color: #667085;
}

.priority-card span {
  align-self: start;
  background: #102a43;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  min-width: 42px;
  padding: 7px 9px;
  text-align: center;
}

.priority-card p {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 860px) {
  .hermes-command {
    align-items: stretch;
    flex-direction: column;
  }

  .run-actions {
    justify-content: stretch;
  }

  .run-actions .button {
    flex: 1 1 160px;
  }

  .hermes-grid {
    grid-template-columns: 1fr;
  }

  .source-picker {
    grid-template-columns: 1fr;
  }

  .connection-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .connect-next-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .sequence-progress ol {
    grid-template-columns: 1fr;
  }

  .connect-button {
    width: 100%;
  }
}
