.evidence-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(0, 1fr);
  flex: 1;
  gap: clamp(12px, 2vw, 30px);
  margin-top: clamp(16px, 3.3vh, 38px);
  min-height: 0;
}

.evidence-corpus,
.evidence-synthesis {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #081d28;
  padding: clamp(14px, 2vw, 30px);
}

.corpus-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}

.corpus-header h3,
.evidence-synthesis h3 {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.65rem);
}

.corpus-header h3 strong {
  margin-right: .12em;
  color: var(--teal);
  font-size: clamp(2.75rem, 5.8vw, 6rem);
  line-height: 1;
  letter-spacing: -.065em;
  font-variant-numeric: tabular-nums;
}

.evidence-period {
  display: grid;
  gap: 2px;
  color: #d3e6e9;
  text-align: right;
}

.evidence-period span {
  color: var(--muted);
  font-size: .74rem;
}

.evidence-groups {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(8px, 1.15vw, 16px);
  margin: auto 0;
  padding-block: clamp(10px, 2vh, 22px);
}

.evidence-class {
  min-width: 0;
  padding: clamp(10px, 1.25vw, 19px);
  border: 1px solid color-mix(in srgb, var(--group) 34%, #22434c);
  border-radius: 12px;
  background: #0c2633;
}

.evidence-eb1 {
  --group: #65ddd5;
  --columns: 6;
  --center-column: 2.5;
  --delivery: 1.5s;
}

.evidence-eb2 {
  --group: #c1b3f4;
  --columns: 4;
  --center-column: 1.5;
  --delivery: 3.2s;
}

.evidence-docs {
  --document-gap: clamp(3px, .55vw, 8px);
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 30px));
  grid-template-rows: repeat(3, auto);
  grid-auto-rows: auto;
  align-content: start;
  justify-content: center;
  gap: var(--document-gap);
  max-width: 245px;
  margin-inline: auto;
  width: 100%;
  min-height: clamp(78px, 9vw, 144px);
}

.evidence-eb2 .evidence-docs {
  max-width: 162px;
}

.evidence-docs i {
  --document-row: 0;
  --document-column: 0;
  --distance-from-center: max(calc(var(--center-column) - var(--document-column)), calc(var(--document-column) - var(--center-column)));
  --drop-order: calc(var(--document-row) * var(--columns) + var(--distance-from-center));
  position: relative;
  display: block;
  max-width: 30px;
  aspect-ratio: .79;
  clip-path: polygon(0 0, 67% 0, 100% 25%, 100% 100%, 0 100%);
  background: var(--group);
  transform-origin: center;
}

.evidence-eb1 .evidence-docs i:nth-child(6n + 2),
.evidence-eb2 .evidence-docs i:nth-child(4n + 2) { --document-column: 1; }

.evidence-eb1 .evidence-docs i:nth-child(6n + 3),
.evidence-eb2 .evidence-docs i:nth-child(4n + 3) { --document-column: 2; }

.evidence-eb1 .evidence-docs i:nth-child(6n + 4),
.evidence-eb2 .evidence-docs i:nth-child(4n + 4) { --document-column: 3; }

.evidence-eb1 .evidence-docs i:nth-child(6n + 5) { --document-column: 4; }
.evidence-eb1 .evidence-docs i:nth-child(6n + 6) { --document-column: 5; }

.evidence-eb1 .evidence-docs i:nth-child(n + 7),
.evidence-eb2 .evidence-docs i:nth-child(n + 5) { --document-row: 1; }

.evidence-eb1 .evidence-docs i:nth-child(n + 13) { --document-row: 2; }

.evidence-docs i::before,
.evidence-docs i::after {
  position: absolute;
  display: block;
  content: '';
  background: #112c3a;
}

.evidence-docs i::before {
  top: 38%;
  right: 18%;
  left: 18%;
  height: 38%;
  opacity: .58;
  background: repeating-linear-gradient(180deg, #112c3a 0 13%, transparent 13% 44%);
}

.evidence-docs i::after {
  top: 0;
  right: 0;
  width: 34%;
  height: 25%;
  opacity: .38;
}

.evidence-class-label {
  margin-top: 8px;
  color: var(--group);
  font-weight: 850;
}

.evidence-class-label strong {
  margin-right: .12em;
  font-size: clamp(1.35rem, 2.3vw, 2.1rem);
  line-height: 1;
}

.evidence-class p {
  margin: 5px 0 0;
  color: #c4d5db;
  font-size: clamp(.73rem, 1.08vw, .94rem);
  line-height: 1.35;
}

.evidence-method {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #a5bdc6;
  font-size: .82rem;
}

.evidence-dimensions {
  display: grid;
  align-content: center;
  flex: 1;
  gap: clamp(5px, 1vh, 12px);
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.evidence-dimensions li {
  --paint-time: calc(4.4s + var(--step) * .85s);
  display: grid;
  grid-template-columns: 2.3em minmax(0, 1fr);
  align-items: center;
  gap: .8em;
  padding: clamp(7px, 1.25vh, 14px) 8px;
  border-bottom: 1px solid #22414d;
  color: #e9f5f7;
  font-size: clamp(.85rem, 1.45vw, 1.3rem);
  font-weight: 720;
}

.evidence-dimensions b {
  padding: .38em 0;
  border-radius: 6px;
  background: var(--teal);
  color: #062833;
  text-align: center;
  font-size: .77em;
  font-variant-numeric: tabular-nums;
}

#evidencias.active:not(.motion-paused) .corpus-header h3 strong {
  display: inline-block;
  animation: evidence-total-in .55s ease-out both;
}

#evidencias.active:not(.motion-paused) .evidence-docs i {
  animation: evidence-document-in .48s cubic-bezier(.23, .75, .29, 1) calc(var(--delivery) + var(--drop-order) * .035s) both;
}

#evidencias.active:not(.motion-paused) .evidence-class-label strong {
  display: inline-block;
  animation: evidence-class-confirm .6s ease-out calc(var(--delivery) + .34s) both;
}

#evidencias.active:not(.motion-paused) .evidence-dimensions li {
  animation: evidence-row-pulse .62s ease-out var(--paint-time) both;
}

#evidencias.active:not(.motion-paused) .evidence-dimensions b {
  animation: evidence-number-paint .31s ease-out var(--paint-time) both;
}

@keyframes evidence-total-in {
  from { opacity: .35; transform: translateY(9px) scale(.86); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes evidence-document-in {
  from {
    opacity: 0;
    transform:
      translate(
        calc((var(--center-column) - var(--document-column)) * (100% + var(--document-gap))),
        calc(-24px - var(--document-row) * (100% + var(--document-gap)))
      )
      rotate(var(--entry-angle, 0deg)) scale(.55);
  }
  38% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

@keyframes evidence-class-confirm {
  0%, 100% { transform: none; text-shadow: none; }
  36% { transform: scale(1.1); text-shadow: 0 0 12px var(--group); }
}

@keyframes evidence-number-paint {
  0% { background: #173b47; color: #b0c9cf; box-shadow: none; }
  72% { background: #a4f4ee; color: #062833; box-shadow: 0 0 14px #65ddd580; }
  100% { background: var(--teal); color: #062833; box-shadow: none; }
}

@keyframes evidence-row-pulse {
  0%, 100% { background: transparent; }
  32% { background: #16414a; }
}

@media (max-width: 700px) {
  .evidence-flow {
    grid-template-columns: 1fr;
    flex: none;
  }

  .evidence-docs {
    min-height: clamp(78px, 24vw, 125px);
  }

  .evidence-dimensions li {
    font-size: .94rem;
  }
}
