.unexpected-hero,
.unexpected-case-hero {
  background: #edf4f6;
  border-bottom: 1px solid var(--color-line);
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.unexpected-hero__grid {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
}

.unexpected-progress,
.unexpected-response,
.unexpected-completion {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg, 18px);
  box-shadow: 0 12px 30px rgb(26 60 69 / 7%);
  padding: 1.25rem;
}

.unexpected-progress .progress-track {
  margin: 1rem 0;
}

.badge--warning {
  background: #fff0e9;
  color: #7d3f2e;
}

.unexpected-sequence {
  counter-reset: reasoning;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.unexpected-sequence li {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  min-height: 7rem;
  padding: 1rem;
}

.unexpected-sequence li::before {
  background: #174e5b;
  border-radius: 999px;
  color: #fff;
  content: counter(reasoning);
  counter-increment: reasoning;
  display: grid;
  font-weight: 700;
  height: 2rem;
  margin-bottom: .75rem;
  place-items: center;
  width: 2rem;
}

.unexpected-filters,
.unexpected-form-grid {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.unexpected-filters label,
.unexpected-response label {
  display: grid;
  font-weight: 650;
  gap: .45rem;
}

.unexpected-filters select,
.unexpected-response select,
.unexpected-response textarea {
  background: #fff;
  border: 1px solid #9eb4bc;
  border-radius: 10px;
  color: inherit;
  font: inherit;
  padding: .75rem;
  width: 100%;
}

.unexpected-response textarea {
  line-height: 1.65;
  margin-bottom: 1rem;
  resize: vertical;
}

.unexpected-case-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.unexpected-case-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem;
}

.unexpected-case-card h3 {
  font-size: 1.2rem;
  margin: .65rem 0;
}

.unexpected-case-card p {
  overflow-wrap: anywhere;
}

.unexpected-case-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.unexpected-card-status {
  color: #536a73;
  font-size: .92rem;
}

.unexpected-breadcrumb {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-bottom: 1rem;
  padding-top: 1rem;
}

.unexpected-image-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unexpected-image-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  margin: 0;
  overflow: hidden;
}

.unexpected-image-card button {
  background: #e8eff1;
  border: 0;
  cursor: zoom-in;
  display: block;
  padding: 0;
  width: 100%;
}

.unexpected-image-card img {
  aspect-ratio: 4 / 3;
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.unexpected-image-card figcaption {
  padding: 1rem;
}

.unexpected-image-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1rem;
}

.unexpected-evidence[hidden] {
  display: none;
}

.unexpected-evidence-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unexpected-evidence-card,
.unexpected-timeline,
.unexpected-source-box {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 1.25rem;
}

.unexpected-evidence-card h3,
.unexpected-timeline h3,
.unexpected-source-box h3 {
  margin-top: 0;
}

.unexpected-evidence-card ul,
.unexpected-source-box ul {
  padding-left: 1.25rem;
}

.unexpected-timeline {
  margin: 1rem 0;
}

.unexpected-timeline ol {
  border-left: 2px solid #aac3ca;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.25rem;
}

.unexpected-timeline li {
  margin-bottom: 1rem;
  position: relative;
}

.unexpected-timeline li::before {
  background: #174e5b;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #174e5b;
  content: "";
  height: .75rem;
  left: -1.7rem;
  position: absolute;
  top: .35rem;
  width: .75rem;
}

.unexpected-completion {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.unexpected-viewer {
  border: 0;
  border-radius: 18px;
  max-height: 92vh;
  max-width: min(96vw, 1200px);
  padding: 1rem;
  width: 100%;
}

.unexpected-viewer::backdrop {
  background: rgb(6 21 26 / 78%);
}

.unexpected-viewer__head {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.unexpected-viewer__head h2 {
  margin-top: 0;
}

.unexpected-viewer__stage {
  align-items: center;
  background: #0b181c;
  display: flex;
  justify-content: center;
  min-height: 20rem;
  overflow: auto;
}

.unexpected-viewer__stage img {
  display: block;
  height: auto;
  max-height: 72vh;
  max-width: 100%;
}

.form-status {
  min-height: 1.5rem;
}

@media (max-width: 960px) {
  .unexpected-case-grid,
  .unexpected-sequence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unexpected-filters,
  .unexpected-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .unexpected-hero__grid,
  .unexpected-case-grid,
  .unexpected-evidence-grid,
  .unexpected-image-grid,
  .unexpected-sequence {
    grid-template-columns: 1fr;
  }

  .unexpected-filters,
  .unexpected-form-grid {
    grid-template-columns: 1fr;
  }

  .unexpected-viewer {
    border-radius: 0;
    height: 100vh;
    margin: 0;
    max-height: 100vh;
    max-width: 100vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .unexpected-viewer,
  .unexpected-viewer::backdrop {
    animation: none;
  }
}
