.cos-check-result {
  width: min(388px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: clamp(18px, 4vw, 30px);
  overflow: auto;
  border: 1px solid var(--co-line, #e4dad1);
  border-radius: 16px;
  background: var(--co-card, #fffdf9);
  color: var(--co-ink, #23201e);
  box-shadow: 0 16px 55px #29211c24;
  text-align: center;
}

.cos-check-result[open] {
  display: grid;
  justify-items: center;
  gap: 14px;
  animation: cos-check-enter 210ms ease-out both;
}

.cos-check-result::backdrop { background: #fffdfad1; }

.cos-check-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--co-accent-soft, #f7e5d9);
  color: var(--co-accent, #a63f28);
}

.cos-check-mark svg { display: none; width: 31px; height: 31px; }
.cos-check-mark path { stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.cos-check-result[data-state="checking"] .cos-check-mark { background: transparent; }

.cos-check-spinner {
  display: none;
  width: 34px;
  height: 34px;
  border: 3px solid var(--co-accent-soft, #f7e5d9);
  border-top-color: currentColor;
  border-radius: 50%;
}

.cos-check-result[data-state="checking"] .cos-check-spinner {
  display: block;
  animation: cos-check-spin 720ms linear infinite;
}

.cos-check-result[data-state="passed"] .cos-check-mark { color: #286044; background: #e6f3ea; }
.cos-check-result[data-state="passed"] .cos-check-success,
.cos-check-result[data-state="retry"] .cos-check-retry { display: block; }

.cos-check-success path {
  stroke-dasharray: 1;
  animation: cos-check-draw 440ms cubic-bezier(.22, 1, .36, 1) both;
}

.cos-check-result-body { display: grid; justify-items: center; gap: 12px; width: 100%; }
.cos-check-result h3 { margin: 0; font-size: clamp(17px, 3vw, 22px); line-height: 1.2; }
.cos-check-result-body > p { color: var(--co-muted, #635a53); font-size: 12px; line-height: 1.5; }
.cos-check-tally { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.cos-check-tally > div { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--co-line, #e4dad1); border-radius: 8px; }
.cos-check-tally strong { font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cos-check-tally span { color: var(--co-muted, #635a53); font-size: 11px; }
.cos-check-result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }

@keyframes cos-check-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cos-check-spin { to { transform: rotate(1turn); } }
@keyframes cos-check-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .cos-check-result[open],
  .cos-check-result[data-state="checking"] .cos-check-spinner,
  .cos-check-success path { animation: none; }
}
