/* Autonomous Workforce: a grid of Telo Line Kit characters, each answering questions in scenes. */

.workforce-main { grid-template-columns: minmax(0, 1fr); align-self: start; }
.workforce-page { max-width: none; }
.workforce-intro { max-width: none; margin-bottom: clamp(20px, 3vh, 30px); }

.workforce-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A card: Paper Off-White inside a scratchy line in the display colour (phosphor or paper ink). */
.workforce-card {
  --ink: #0B0B0B;
  --paper: #F7F4EA;
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1.06;
  min-width: 0;
  padding: 14px 16px 14px;
  background: var(--paper);
  color: var(--ink);
}
.workforce-card .card-border {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  color: var(--fg-strong);
  pointer-events: none;
  overflow: visible;
}
.card-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}
.card-index { color: #6b6b62; margin-right: 6px; font-weight: 400; }

.card-stage { position: relative; flex: 1; min-height: 0; margin: 4px -6px 0; }
.card-stage svg.scene { display: block; width: 100%; height: 100%; }
.card-stage .shot { transition: none; }   /* a cut: never two poses on screen at once */

/* Speech bubble: real text over a bubble drawn to the kit's shape and line weight. */
.bubble {
  position: absolute;
  top: 6%;
  left: 52%;
  width: 46%;
  padding: 9px 11px 10px;
  color: var(--ink);
  font-size: clamp(0.66rem, 0.78vw, 0.76rem);
  line-height: 1.38;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}
.bubble.is-shown { opacity: 1; transform: none; }
.bubble p { position: relative; z-index: 1; margin: 0; max-width: none; overflow-wrap: normal; }
.bubble svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.card-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(11, 11, 11, 0.35);
}
.card-actions button {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(0.66rem, 0.78vw, 0.74rem);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.card-actions button::before { content: "[ "; color: #6b6b62; }
.card-actions button::after { content: " ]"; color: #6b6b62; }
.card-actions button:hover,
.card-actions button[aria-pressed="true"] { text-decoration: underline; text-decoration-color: #0a7f3f; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.card-actions .start-over { margin-left: auto; color: #4f4d46; }
.card-actions button[hidden] { display: none; }
.card-actions button:disabled { color: #8a877c; cursor: default; text-decoration: none; }
.card-actions button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 980px) {
  .workforce-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bubble, .card-actions button { font-size: 0.74rem; }
}
@media (max-width: 620px) {
  .workforce-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .workforce-card { aspect-ratio: 1 / 1.08; }
}
@media (prefers-reduced-motion: reduce) {
  .card-stage .shot, .bubble { transition: none; }
}
