/* The sample check report (kit/CheckReport.astro): a document with rows that fill, beside the documents kept. */

.kreport {
  display: grid;
  gap: var(--s-6);
}
.kreport--docs {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}
.kreport__doc {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}
.kreport__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, var(--tint-hover) 10px 11px),
    var(--paper-2);
}
.kreport__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
}
.kreport__name svg {
  color: var(--ok-ink);
}
.kreport__sample {
  margin: 0;
  padding: 2px 8px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-pill);
  color: var(--muted);
}
.kreport__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.kreport__table th,
.kreport__table td {
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.kreport__table thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--faint);
}
.kreport__table tbody th {
  font-weight: 550;
  color: var(--ink);
}
.kreport__num {
  text-align: right !important;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kreport__note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.45;
}
.kreport__res {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 260ms var(--ease), transform 260ms cubic-bezier(0.3, 1.6, 0.5, 1);
}
.kreport__res--moves {
  background: var(--ok-tint);
  color: var(--ok-ink);
}
.kreport__res--rebuilt {
  background: var(--warn-tint);
  color: var(--warn-ink);
}
.kreport__res--cannot {
  background: var(--paper-3);
  color: var(--muted);
}
.kreport__row {
  transition: background-color 400ms var(--ease);
}
.kreport__row:not(.is-done) .kreport__res {
  opacity: 0;
  transform: scale(0.6);
}
.kreport__row:not(.is-done) .kreport__note {
  opacity: 0.35;
}
.kreport__row.is-counting {
  background: var(--accent-tint);
}
.kreport__row.is-done.kreport__row--moves th::before {
  content: '';
}
.kreport__foot {
  padding: var(--s-3) var(--s-4);
  color: var(--muted);
}

.kreport__docs {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.kreport__docitem {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.kreport__docitem:hover {
  border-color: var(--accent-tint-2);
  transform: translateX(3px);
}
.kreport__docicon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--accent-tint);
  color: var(--accent-deep);
}
.kreport__doceyebrow {
  margin: 0 0 2px;
  color: var(--accent-deep);
}
.kreport__doctitle {
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.35;
}
.kreport__docbody {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.55;
}

@media (max-width: 1000px) {
  .kreport--docs {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .kreport__doc {
    overflow-x: auto;
  }
  .kreport__table th,
  .kreport__table td {
    padding: 8px 6px;
  }
  .kreport__table th:first-child,
  .kreport__table td:first-child {
    padding-left: 12px;
  }
  .kreport__table thead th {
    letter-spacing: 0;
  }
  /* rule 542: the count headings ("In monday.com") wrap on a phone, so the table fits the card at 360px */
  .kreport__table thead .kreport__num {
    white-space: normal;
    font-size: 12px;
  }
  .kreport__num {
    font-size: 12px;
  }
  /* rule 542(e): the result word stays readable on a phone (it was shrunk to a dot); the icon goes instead */
  .kreport__res {
    padding: 2px 6px;
    gap: 0;
    font-size: 12px;
    letter-spacing: 0;
  }
  .kreport__res svg {
    display: none;
  }
  .kreport__table {
    font-size: var(--fs-xs);
  }
}
@media (prefers-reduced-motion: reduce) {
  .kreport *,
  .kreport__row {
    animation: none !important;
    transition: none !important;
  }
}

.kreport__top {
  flex-wrap: wrap;
  gap: var(--s-2);
}
.kreport__sample {
  border-radius: var(--radius);
}
