/*
 * Virtual Cell Challenge retrospective (projects/virtual-cell-challenge.qmd).
 * Everything is prefixed vcc- so none of it leaks into the other case studies.
 * Colours reuse the brand tokens; --vcc-ref is the one extra hue, used only
 * where a chart needs a second series (validated against --cream-card).
 */

:root {
  --vcc-ours: #c96545;
  --vcc-ref: #2b6fb0;
  --vcc-good: #687f73;
  --vcc-bad: #a94f35;
}

.vcc-intro {
  margin: 1.6rem 0 2rem;
  padding: 1.4rem 1.6rem;
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--vcc-ours);
  border-radius: 14px;
}

.vcc-intro p {
  color: var(--text) !important;
  font-family: var(--editorial);
  font-size: 1.12rem;
  line-height: 1.6;
}

.vcc-intro p:last-child {
  margin-bottom: 0;
}

/* ---------- stat row ---------- */

.vcc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.vcc-stats > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

.vcc-stats strong {
  color: var(--text);
  font-family: var(--editorial);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.vcc-stats span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* ---------- metric cards, model cards ---------- */

.vcc-metrics,
.vcc-models {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.75rem;
  margin: 1.4rem 0 1.8rem;
}

.vcc-metrics article,
.vcc-models article {
  padding: 1rem 1.1rem;
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

.vcc-metrics article:nth-child(6n + 1) { background: var(--peach); }
.vcc-metrics article:nth-child(6n + 2) { background: var(--sage); }
.vcc-metrics article:nth-child(6n + 3) { background: var(--wheat); }
.vcc-metrics article:nth-child(6n + 4) { background: var(--mist); }
.vcc-metrics article:nth-child(6n + 5) { background: var(--blush); }
.vcc-metrics article:nth-child(6n + 6) { background: var(--stone); }

.vcc-metrics h4,
.vcc-models h4 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vcc-metrics p,
.vcc-models p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
  text-align: left !important;
}

/* ---------- pipeline ---------- */

.vcc-pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
  margin: 1.4rem 0 1.6rem;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.vcc-pipeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1rem 0.9rem;
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

.vcc-step {
  display: inline-grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  color: #fffaf1;
  background: var(--night);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.vcc-pipeline h4 {
  margin: 0.2rem 0 0;
  text-align: left;
  color: var(--text);
  font-family: var(--editorial);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
}

.vcc-pipeline p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: left !important;
}

.vcc-pipeline em {
  margin-top: auto;
  padding-top: 0.4rem;
  color: #a94f35;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- charts ---------- */

.vcc-chart {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin: 1.8rem 0 2.2rem;
  padding: 1.1rem 1.1rem 0.9rem;
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-radius: 18px;
}

.vcc-chart figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.vcc-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vcc-svg {
  display: block;
  width: 100%;
  min-width: 600px;
  height: auto;
}

.vcc-svg-mini {
  min-width: 0;
}

.vcc-svg .mono,
.vcc-svg .t.mono {
  font-family: var(--mono);
}

.vcc-svg text {
  font-family: var(--humanist);
}

.vcc-svg .pt:hover circle:last-child {
  stroke-width: 3;
}

.vcc-multiples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
}

.vcc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 0 0 0.4rem;
  color: var(--text) !important;
  font-size: 0.85rem;
}

.vcc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.vcc-legend i {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

/* ---------- chapter furniture ---------- */

.vcc-chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin: -0.4rem 0 1.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--hairline);
}

.vcc-when {
  color: #a94f35;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vcc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.vcc-chips span {
  padding: 0.3rem 0.6rem;
  color: var(--text);
  background: var(--cream-deep);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.vcc-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.9rem;
  margin: 1.4rem 0;
}

.vcc-good,
.vcc-bad {
  padding: 1.1rem 1.2rem 0.4rem;
  border-radius: 14px;
}

.vcc-good {
  background: var(--sage);
  border-top: 3px solid var(--vcc-good);
}

.vcc-bad {
  background: var(--blush);
  border-top: 3px solid var(--vcc-bad);
}

.vcc-good h4,
.vcc-bad h4 {
  margin-top: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vcc-good h4::before {
  content: "✓  ";
  color: var(--vcc-good);
}

.vcc-bad h4::before {
  content: "✕  ";
  color: var(--vcc-bad);
}

.vcc-good li,
.vcc-bad li {
  color: var(--text) !important;
  text-align: left !important;
}

.vcc-next {
  margin: 1.6rem 0 0.5rem;
  padding: 1.1rem 1.3rem;
  background: var(--night);
  border-radius: 14px;
}

.vcc-next p {
  margin: 0;
  color: #efe6d8 !important;
  text-align: left !important;
}

.vcc-next strong {
  color: var(--signal-warm);
}

.vcc-note {
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  background: var(--mist);
  border-radius: 14px;
}

.vcc-note p {
  margin: 0;
  color: var(--text) !important;
  font-size: 0.95rem;
}

/* ---------- glossary ---------- */

.vcc-glossary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
  margin: 1.2rem 0 2rem;
}

.vcc-glossary > div {
  padding: 0.9rem 1rem;
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

.vcc-glossary dt {
  margin-bottom: 0.3rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vcc-glossary dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* Wide tables scroll inside their own box instead of the page. */
main.content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 760px) {
  .vcc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.vcc-swipe {
  display: none;
}

@media (max-width: 760px) {
  .vcc-swipe {
    display: inline;
    font-style: italic;
  }
}

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

@media (max-width: 760px) {
  .vcc-stats.vcc-stats-3 {
    grid-template-columns: 1fr;
  }
}

/* ---------- references ---------- */

.vcc-refs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.5rem 2rem;
  margin: 1.2rem 0 2rem;
}

.vcc-refs h4 {
  margin: 0.6rem 0 0.5rem;
  color: #a94f35;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vcc-refs ul {
  padding-left: 1.1rem;
}

.vcc-refs li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: left !important;
}

.vcc-refs a {
  color: var(--text);
  text-decoration-color: rgba(201, 101, 69, 0.5);
  text-underline-offset: 2px;
}

.vcc-refs a:hover {
  color: #a94f35;
}

.vcc-search article:nth-child(1) { background: var(--peach); }
.vcc-search article:nth-child(2) { background: var(--mist); }
.vcc-search article:nth-child(3) { background: var(--sage); }
