.wsp-identify-page {
  min-height: 72vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(249, 115, 22, .14), transparent 30%),
    linear-gradient(180deg, #111111 0%, #0d0c0c 54%, #111827 100%);
  color: #f8fafc;
}

.wsp-identify-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 76px;
}

.wsp-identify-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, .55fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.wsp-identify-hero h1 {
  max-width: 850px;
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.02;
}

.wsp-identify-status-card,
.wsp-identify-panel,
.wsp-identify-results,
.wsp-review-panel {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(17, 24, 39, .92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.wsp-identify-status-card {
  display: grid;
  gap: 6px;
  padding: 20px;
}

.wsp-identify-status-card strong {
  display: block;
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.wsp-identify-status-card span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .64);
  font-size: 13px;
}

.wsp-identify-panel {
  padding: 18px;
}

.wsp-identify-form {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 18px;
}

.wsp-upload-card {
  border: 1px dashed rgba(249, 115, 22, .46);
  border-radius: 14px;
  padding: 14px;
  background: rgba(249, 115, 22, .08);
}

.wsp-upload-card.is-dragging {
  border-color: #fdba74;
  background: rgba(249, 115, 22, .16);
}

.wsp-upload-preview {
  display: grid;
  min-height: 230px;
  margin-bottom: 12px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: rgba(255, 255, 255, .62);
  background: rgba(15, 23, 42, .84);
}

.wsp-upload-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: contain;
}

.wsp-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  color: #111827;
  background: #fb923c;
  font-weight: 900;
  cursor: pointer;
}

.wsp-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.wsp-upload-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .66);
  font-size: 13px;
  line-height: 1.55;
}

.wsp-identify-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wsp-field-wide {
  grid-column: 1 / -1;
}

.wsp-field label {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 800;
}

.wsp-field input,
.wsp-field select,
.wsp-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  box-sizing: border-box;
  padding: 12px;
  color: #111827;
  background: #fff;
  font: inherit;
}

.wsp-field textarea {
  resize: vertical;
}

.wsp-field input:focus,
.wsp-field select:focus,
.wsp-field textarea:focus {
  border-color: #fb923c;
  outline: none;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .2);
}

.wsp-identify-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}

.wsp-identify-actions button,
.wsp-review-actions button,
.wsp-identify-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  color: #111827;
  background: #fb923c;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.wsp-identify-secondary,
.wsp-review-actions .wsp-identify-secondary {
  border: 1px solid rgba(255, 255, 255, .12);
  color: #f8fafc;
  background: rgba(255, 255, 255, .07);
}

.wsp-identify-actions button:hover,
.wsp-review-actions button:hover,
.wsp-identify-secondary:hover {
  filter: brightness(1.08);
}

.wsp-identify-results,
.wsp-review-panel {
  margin-top: 22px;
  padding: 18px;
}

.wsp-identify-results-top {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.wsp-identify-results h2,
.wsp-review-panel h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
}

.wsp-identify-results-top p:last-child,
.wsp-review-panel p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, .66);
  line-height: 1.55;
}

.wsp-match-groups {
  display: grid;
  gap: 16px;
}

.wsp-match-group {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 14px;
}

.wsp-match-group h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.wsp-match-grid,
.wsp-common-list,
.wsp-confusion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wsp-match-card,
.wsp-common-card,
.wsp-confusion-card {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 14px;
  background: rgba(15, 23, 42, .8);
}

.wsp-match-card h4,
.wsp-common-card h3,
.wsp-confusion-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.wsp-match-card p,
.wsp-common-card p,
.wsp-confusion-card p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .68);
  line-height: 1.55;
}

.wsp-match-card a,
.wsp-common-card a,
.wsp-confusion-card a {
  color: #fdba74;
  font-weight: 900;
  text-decoration: none;
}

.wsp-match-card a:hover,
.wsp-common-card a:hover,
.wsp-confusion-card a:hover {
  text-decoration: underline;
}

.wsp-match-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.wsp-match-chip {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  padding: 5px 8px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
  font-weight: 800;
}

.wsp-score {
  color: #86efac;
}

.wsp-identify-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.wsp-identify-two-col .wsp-identify-results {
  margin-top: 22px;
}

.wsp-common-card ul,
.wsp-confusion-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, .72);
}

.wsp-common-card li,
.wsp-confusion-card li {
  margin-bottom: 6px;
}

.wsp-review-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.wsp-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.wsp-review-status {
  grid-column: 1 / -1;
  margin-top: 0 !important;
}

.wsp-review-packet {
  grid-column: 1 / -1;
  max-height: 240px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 12px;
  color: #d1d5db;
  background: rgba(0, 0, 0, .32);
  white-space: pre-wrap;
}

@media (max-width: 920px) {
  .wsp-identify-hero,
  .wsp-identify-form,
  .wsp-identify-two-col,
  .wsp-review-panel {
    grid-template-columns: 1fr;
  }

  .wsp-identify-actions {
    grid-column: 1;
  }

  .wsp-match-grid,
  .wsp-common-list,
  .wsp-confusion-list {
    grid-template-columns: 1fr;
  }

  .wsp-identify-results-top {
    display: block;
  }
}

@media (max-width: 620px) {
  .wsp-identify-wrap {
    width: min(100% - 20px, 1240px);
    padding-top: 28px;
  }

  .wsp-identify-fields {
    grid-template-columns: 1fr;
  }

  .wsp-identify-actions,
  .wsp-review-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .wsp-identify-actions button,
  .wsp-identify-actions a,
  .wsp-review-actions button {
    width: 100%;
  }
}
