/* Production → Runs (docs/05-views.md; mockup "laeufe"; docs/design.md §4.4) */

.runs__name {
  font-weight: 600;
}

.runs__sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

/* Progress inside a cell: a 6px pill bar with the status line below. */
.runs__bar {
  overflow: hidden;
  min-width: 110px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--blue-tint);
}

.runs__bar i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--blue);
  transition: width var(--duration-swap) var(--ease-out);
}

.runs__state .runs__bar + .runs__sub {
  margin-top: 6px;
}

/* Run detail (docs/05-views.md, "Run (detail)"): the step bar and the articles' states. Running
   spins its icon with a progress shimmer under the step, waiting pulses, failed is static red, done
   pops its check once; no motion with prefers-reduced-motion. */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  overflow: hidden;
  flex: 1 1 130px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.step.done {
  border-color: transparent;
  background: var(--surface);
}

.step.running {
  border-color: var(--blue);
}

.step.waiting {
  border-color: var(--lime);
  animation: run-ring var(--duration-run-pulse) ease-in-out infinite;
}

.step.failed {
  border-color: var(--red);
}

.step .n {
  color: var(--blue);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

.step .lb {
  margin-top: 6px;
  font-family: var(--f-display);
  font-weight: 600;
}

.step .lb .ms {
  margin-right: 6px;
  font-size: 17px;
  vertical-align: -3px;
}

.step .nt {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.step.running::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent) no-repeat;
  background-size: 40% 100%;
  animation: run-shimmer var(--duration-run-shimmer) linear infinite;
  content: "";
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.act .ms {
  font-size: 17px;
}

.act.running .ms,
.step.running .lb .ms {
  color: var(--blue);
  animation: run-spin var(--duration-run-spin) linear infinite;
}

.act.done .ms,
.step.done .lb .ms {
  color: var(--blue);
  animation: run-pop var(--duration-run-pop) var(--ease-out);
}

.act.waiting .ms,
.act.wait .ms,
.step.waiting .lb .ms {
  border-radius: 50%;
  background: var(--lime);
  color: var(--on-lime);
  animation: run-pulse var(--duration-run-pulse) ease-in-out infinite;
}

.act.failed,
.act.failed .ms,
.step.failed .lb .ms {
  color: var(--red);
}

.act.pending {
  color: var(--muted);
}

@keyframes run-spin { to { transform: rotate(360deg); } }
@keyframes run-pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1); } }
@keyframes run-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--lime); } 50% { box-shadow: 0 0 0 5px transparent; } }
@keyframes run-ring { 0%, 100% { box-shadow: 0 0 0 0 var(--lime); } 50% { box-shadow: 0 0 0 4px transparent; } }
@keyframes run-shimmer { from { background-position: -60% 0; } to { background-position: 160% 0; } }

@media (prefers-reduced-motion: reduce) {
  .act .ms,
  .step,
  .step .lb .ms {
    animation: none;
  }

  .step.running::after {
    display: none;
  }
}

.runs__name a {
  color: inherit;
  text-decoration: none;
}

.runs__name a:hover {
  text-decoration: underline;
}

/* Run detail → Sample: the state of the stored PDF under the heading (#1105). */
.sample-pdf__state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Run detail → Sample (docs/05-views.md, "Run (detail)"; mockup "lauf", "sample pdf page"): the first
   page of the sample PDF on its grey page, white cards, the navy number circle and lime labels. The
   language cards sit side by side and stack on a phone. */
.sample-page {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
}

.sample-page__card {
  min-width: 0;
  margin-bottom: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow-wrap: anywhere;
}

.sample-page__header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sample-page__number {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--nav);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.sample-page__title {
  min-width: 0;
}

.sample-page__line,
.sample-page__of,
.sample-page__more {
  color: var(--muted);
  font-size: 11px;
}

.sample-page__name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.sample-page__of {
  margin-left: auto;
  white-space: nowrap;
}

.sample-page__label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.sample-page__label::before {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--lime);
  content: "";
}

.sample-page__more {
  margin-left: auto;
  font-weight: 400;
}

.sample-page__images {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sample-page__images img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
  object-fit: contain;
}

.sample-page__columns {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 10px;
}

.sample-page__columns .sample-page__card {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
}

.sample-page__text h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.sample-page__text h4 {
  margin: 6px 0 2px;
  font-size: 13px;
  font-weight: 600;
}

.sample-page__text p {
  margin: 0 0 4px;
}

.sample-page__text ul {
  margin: 4px 0 0;
  padding-left: 16px;
}

.sample-page__caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sample-page__empty {
  margin: 0;
  color: var(--muted);
}

@container app (max-width: 599px) {
  .sample-page__columns {
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
  }

  .sample-page__images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
