.tool-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 440px);
  gap: 2rem;
  align-items: start;
}

.tool-upload-shell,
.tool-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(13, 65, 123, 0.12);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(18, 38, 63, 0.08);
}

.tool-panel {
  padding: 1.5rem;
}

.tool-panel-copy,
.tool-footnote,
.tool-live-state,
.tool-status-card p,
.tool-finding p,
.tool-cta-shell p {
  color: rgba(17, 31, 54, 0.74);
}

.tool-form {
  display: grid;
  gap: 1rem;
}

.file-drop {
  display: grid;
  gap: 0.65rem;
  padding: 1.25rem;
  border: 1.5px dashed rgba(13, 65, 123, 0.25);
  border-radius: 18px;
  background: rgba(231, 244, 255, 0.72);
  cursor: pointer;
}

.file-drop-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d417b;
}

.file-drop-copy {
  color: rgba(17, 31, 54, 0.72);
  font-size: 0.95rem;
}

.file-drop input[type="file"] {
  width: 100%;
  color: #11203a;
}

.tool-textarea-shell {
  display: grid;
  gap: 0.65rem;
}

.tool-textarea-shell textarea {
  width: 100%;
  min-height: 180px;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(13, 65, 123, 0.18);
  border-radius: 18px;
  background: #ffffff;
  font: inherit;
  color: #11203a;
  resize: vertical;
}

.tool-textarea-shell textarea:focus {
  outline: 2px solid rgba(13, 65, 123, 0.18);
  border-color: rgba(13, 65, 123, 0.35);
}

.tool-submit[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.tool-feedback {
  min-height: 1.4rem;
  font-size: 0.95rem;
}

.tool-feedback.is-error {
  color: #9a1b1b;
}

.tool-feedback.is-working {
  color: #0d417b;
}

.tool-cta-strip {
  padding-top: 0;
}

.tool-cta-shell {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(231, 244, 255, 0.92), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(13, 65, 123, 0.12);
}

.tool-result-header,
.tool-status-shell,
.tool-result-grid {
  display: grid;
  gap: 1.5rem;
}

.tool-result-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 1.5rem;
}

.tool-result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tool-status-shell {
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: stretch;
}

.tool-score-card,
.tool-status-card,
.tool-breakdown-card,
.tool-finding {
  background: #ffffff;
  border: 1px solid rgba(13, 65, 123, 0.12);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(18, 38, 63, 0.06);
}

.tool-score-card,
.tool-status-card {
  padding: 1.3rem 1.4rem;
}

.tool-score-label,
.finding-category {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(17, 31, 54, 0.58);
}

.tool-score-value {
  display: block;
  margin-top: 0.35rem;
  font-size: 3rem;
  line-height: 1;
  color: #0d417b;
}

.tool-score-max {
  font-size: 1rem;
  color: rgba(17, 31, 54, 0.58);
}

.tool-list {
  margin: 0;
  padding-left: 1.1rem;
}

.tool-list li + li {
  margin-top: 0.7rem;
}

.tool-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.tool-breakdown-card {
  padding: 1rem 1.1rem;
}

.tool-breakdown-card strong,
.tool-finding h3 {
  color: #11203a;
}

.tool-breakdown-card span {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0d417b;
}

.tool-findings {
  display: grid;
  gap: 1rem;
}

.tool-finding {
  padding: 1.15rem 1.25rem;
}

.tool-finding-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.tool-finding-fix {
  margin-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pill.is-queued,
.status-pill.is-processing,
.status-pill.is-medium {
  background: rgba(255, 209, 102, 0.2);
  color: #8a5c00;
}

.status-pill.is-ready,
.status-pill.is-positive {
  background: rgba(82, 196, 122, 0.18);
  color: #166534;
}

.status-pill.is-failed,
.status-pill.is-high {
  background: rgba(234, 84, 85, 0.16);
  color: #991b1b;
}

.status-pill.is-low {
  background: rgba(13, 65, 123, 0.1);
  color: #0d417b;
}

.tool-finding.severity-high {
  border-left: 4px solid #d23a3a;
}

.tool-finding.severity-medium {
  border-left: 4px solid #d29a1e;
}

.tool-finding.severity-low {
  border-left: 4px solid #0d417b;
}

.tool-finding.severity-positive {
  border-left: 4px solid #1f8f4a;
}

.tool-finding.severity-neutral {
  border-left: 4px solid rgba(13, 65, 123, 0.2);
}

@media (max-width: 920px) {
  .tool-hero-grid,
  .tool-result-header,
  .tool-status-shell {
    grid-template-columns: 1fr;
  }

  .tool-result-actions {
    justify-content: flex-start;
  }

  .tool-cta-shell {
    flex-direction: column;
    align-items: flex-start;
  }
}
