/* Collection page. Serif speaks to the person, monospace reports the machine. */

.shell {
  width: min(100%, 660px);
  margin-inline: auto;
  padding: 22px 20px 56px;
}

.card {
  position: relative;
  margin-top: 14px;
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card::after {
  position: absolute;
  top: -1px;
  left: clamp(26px, 5vw, 44px);
  width: 46px;
  height: 2px;
  content: "";
  background: var(--signal);
}

.stage > * {
  animation: rise 460ms var(--ease) backwards;
}

.stage > *:nth-child(2) { animation-delay: 50ms; }
.stage > *:nth-child(3) { animation-delay: 100ms; }
.stage > *:nth-child(4) { animation-delay: 150ms; }
.stage > *:nth-child(5) { animation-delay: 200ms; }
.stage > *:nth-child(6) { animation-delay: 250ms; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

/* ---- idle ------------------------------------------------------------ */

h1 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 7vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

h1 em {
  color: var(--signal);
  font-style: italic;
}

.lede {
  margin: 18px 0 26px;
  max-width: 44ch;
}

.disclose {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.disclose summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 0.71rem;
  letter-spacing: 0.13em;
  list-style: none;
  text-transform: uppercase;
}

.disclose summary::-webkit-details-marker {
  display: none;
}

.disclose summary:hover {
  color: var(--ink);
}

.disclose summary i {
  position: relative;
  width: 11px;
  height: 11px;
  flex: none;
}

.disclose summary i::before,
.disclose summary i::after {
  position: absolute;
  inset: 5px 0 auto;
  height: 1px;
  content: "";
  background: currentColor;
  transition: transform 220ms var(--ease);
}

.disclose summary i::after {
  transform: rotate(90deg);
}

.disclose[open] summary i::after {
  transform: rotate(0deg);
}

.disclose-body {
  padding: 2px 15px 16px;
}

.disclose-body ul {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.disclose-body li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.78rem;
  line-height: 1.55;
}

.disclose-body li b {
  color: var(--ink);
  font-weight: 500;
}

.field {
  margin: 24px 0 20px;
}

.go {
  width: 100%;
}

.go svg {
  transition: transform 200ms var(--ease);
}

.go:hover svg {
  transform: translateX(3px);
}

.go-note {
  margin: 12px 0 0;
  text-align: center;
}

/* ---- run ------------------------------------------------------------- */

.meter {
  height: 3px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-2);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--signal);
  transition: width 200ms linear;
}

.ticker {
  margin: 10px 0 0;
  color: var(--ink-3);
  font-size: 0.71rem;
  letter-spacing: 0.02em;
}

/* ---- done / error ---------------------------------------------------- */

.done-title {
  margin: 8px 0 22px;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.eyebrow.err {
  color: var(--bad);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.stats div {
  padding: 13px 14px;
  background: var(--surface);
}

.stats dt {
  color: var(--ink-3);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.stats dd {
  margin: 7px 0 0;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.receipt {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.receipt-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.receipt-row + .receipt-row {
  border-top: 1px solid var(--line);
}

.receipt-row > span {
  color: var(--ink-3);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.receipt-row code {
  overflow-wrap: anywhere;
  color: var(--signal);
  font-size: 0.76rem;
}

.copy {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.64rem;
}

.receipt + .fine {
  margin-top: 14px;
}

/* ---- footer ---------------------------------------------------------- */

.bar-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.trace {
  margin: 0 0 22px;
  padding: 0;
}

.trace canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.trace figcaption {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.verbatim {
  letter-spacing: 0;
  text-transform: none;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 0 3px;
  color: var(--ink-3);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 520px) {
  .field > span {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .receipt-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .receipt-row > span {
    grid-column: 1 / -1;
  }

  .foot span:last-child {
    display: none;
  }
}
