/* ============================================================
   Case study detail — the project record as a readable page
   Follows the equipment page's grammar: alternating white /
   light-grey sections, the shared section head, a fact strip
   with a blue top edge, cards and numbered ladder rows. The
   verified stage travels as a blue text chip — never a medal
   (DESIGN.md §10 案例和项目阶段). Local prefix: nz-cs-.
   ============================================================ */

.nz-cs-section {
  padding: 96px 0;
  background: var(--white);
}

.nz-cs-section--soft {
  background: var(--gray-bg);
}

.nz-cs-head {
  margin-bottom: 42px;
}

.nz-cs-head .section-heading {
  margin-bottom: 0;
}

.nz-cs-head .section-heading__copy h2 {
  max-width: 26ch;
  margin-bottom: 0;
}

/* ---- Prose blocks inside cards ---- */
.nz-cs-prose {
  color: var(--gray-text);
  font-size: 15px;
  line-height: 1.7;
}

.nz-cs-prose > *:last-child {
  margin-bottom: 0;
}

.nz-cs-prose p + p {
  margin-top: 10px;
}

.nz-cs-prose ul,
.nz-cs-prose ol {
  max-width: 72ch;
  padding-left: 22px;
}

.nz-cs-prose li {
  margin-bottom: 8px;
}

.nz-cs-subhead {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 1.05rem;
  font-weight: 700;
}

@media (max-width: 940px) {
  .nz-cs-head {
    margin-bottom: 30px;
  }
}

@media (max-width: 900px) {
  .nz-cs-section {
    padding: 68px 0;
  }
}

@media (max-width: 650px) {
  .nz-cs-section {
    padding: 52px 0;
  }
}

/* ---- The fact strip under the page header ---- */
.nz-cs-strip {
  padding: 36px 0 64px;
  background: var(--white);
}

.nz-cs-strip .nz-single__meta {
  margin-bottom: 28px;
}

.nz-cs-facts {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 0;
  border: 1px solid var(--gray-line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--white);
}

.nz-cs-facts__row {
  padding: 20px 24px;
  border-left: 1px solid var(--gray-line);
  border-top: 1px solid var(--gray-line);
}

.nz-cs-facts__row:first-child {
  border-left: 0;
}

@media (min-width: 651px) {
  .nz-cs-facts__row:nth-child(-n + 5) {
    border-top: 0;
  }
}

.nz-cs-facts dt {
  margin-bottom: 6px;
  color: var(--gray-text);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nz-cs-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.nz-cs-facts .text-link {
  font-size: 1rem;
}

/* The verified stage as a blue text chip — the same family the
   home page's case cards use, never a green medal. */
.nz-cs-stagechip {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---- The situation: the goal first, then the condition cards ---- */
.nz-cs-goal {
  max-width: 780px;
  margin-bottom: 22px;
  padding: 24px 28px;
  border: 1px solid var(--gray-line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--white);
}

.nz-cs-goal .nz-cs-prose {
  color: var(--text);
  font-size: 1.05rem;
}

.nz-cs-sitcards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.nz-cs-sitcard {
  padding: 22px 26px;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  background: var(--white);
}

@media (max-width: 760px) {
  .nz-cs-sitcards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- What was delivered: reason cards, then the scope rows ---- */
.nz-cs-why {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 44px;
}

.nz-cs-whycard {
  padding: 22px 26px;
  border: 1px solid var(--gray-line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--white);
}

.nz-cs-why .nz-cs-whycard:only-child {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .nz-cs-why {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 32px;
  }
}

.nz-cs-scopehead {
  margin-bottom: 6px;
}

.nz-cs-scope {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nz-cs-scoperow {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr) auto;
  gap: 8px 32px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--gray-line);
}

.nz-cs-scoperow:first-child {
  border-top: 0;
}

.nz-cs-typechip {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--gray-line);
  border-radius: 999px;
  color: var(--gray-text);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nz-cs-scoperow__what {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: baseline;
}

.nz-cs-scoperow__name {
  font-size: 16.5px;
  font-weight: 600;
}

.nz-cs-scoperow__name a {
  color: var(--blue);
}

.nz-cs-scoperow__config {
  grid-column: 2;
  color: var(--gray-text);
  font-size: 13.5px;
  line-height: 1.55;
}

.nz-cs-scoperow__role p {
  margin: 0;
  color: var(--gray-text);
  font-size: 14px;
  line-height: 1.6;
}

.nz-cs-scoperow__note {
  color: var(--gray-text);
  font-size: 13px;
  font-style: italic;
}

.nz-cs-scoperow__qty {
  padding-top: 3px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .nz-cs-scoperow {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .nz-cs-scoperow__qty {
    padding-top: 0;
  }
}

/* ---- Verified stages: the numbered ladder, blue family ---- */
.nz-cs-stages {
  max-width: 860px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nz-cs-stagerow {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--gray-line);
}

.nz-cs-stagerow:first-child {
  border-top: 0;
}

.nz-cs-stagerow__num {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.nz-cs-stagerow__label {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
}

.nz-cs-stagerow__body {
  max-width: 68ch;
}

.nz-cs-stagerow__body .nz-cs-prose {
  color: var(--gray-text);
  font-size: 14.5px;
}

/* ---- Results: figures only ever with their method ---- */
.nz-cs-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.nz-cs-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 28px;
  border: 1px solid var(--gray-line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--white);
}

.nz-cs-result__metric {
  margin: 0;
  font-size: 17px;
}

.nz-cs-result__figures {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.nz-cs-result__before {
  color: var(--gray-text);
  font-size: 1.35rem;
}

.nz-cs-result__arrow {
  color: var(--gray-text);
}

.nz-cs-result__after {
  color: var(--blue);
  font-size: 1.7rem;
  font-weight: 700;
}

.nz-cs-result__unit {
  margin: -6px 0 0;
  color: var(--gray-text);
  font-size: 13px;
  line-height: 1.5;
}

.nz-cs-result__evidence {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.nz-cs-result__evidence-label {
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nz-cs-result__meta {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 2px 0 0;
  border-top: 1px solid var(--gray-line);
}

.nz-cs-result__metarow {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-line);
}

.nz-cs-result__metarow:last-child {
  border-bottom: 0;
}

.nz-cs-result__metarow dt {
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nz-cs-result__metarow dd {
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}

.nz-cs-result__file {
  display: grid;
  gap: 4px;
  margin: 0;
}

.nz-cs-result__file .text-link {
  justify-self: start;
}

.nz-cs-result__filenote {
  color: var(--gray-text);
  font-size: 12.5px;
}

@media (max-width: 860px) {
  .nz-cs-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .nz-cs-result__metarow {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* ---- Hero picture under the fact strip ----
   The featured image, or its upload spec. Contain on white, so a drawing and
   a photograph both sit cleanly in the 16:9 slot. */
.nz-cs-hero {
  padding: 0 0 64px;
  background: var(--white);
}

.nz-cs-hero__figure {
  margin: 0;
}

.nz-cs-hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  background: var(--white);
}

.nz-cs-hero__cap {
  display: block;
  padding-top: 10px;
  color: var(--gray-text);
  font-size: 13px;
  line-height: 1.5;
}

/* ---- Pictures, videos and records ---- */
.nz-cs-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nz-cs-media--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nz-cs-media__item {
  margin: 0;
}

.nz-cs-media__link {
  display: block;
}

.nz-cs-media__img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
}

@media (max-width: 860px) {
  .nz-cs-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .nz-cs-media {
    grid-template-columns: minmax(0, 1fr);
  }
}

.nz-cs-videos {
  margin-top: 36px;
}

.nz-cs-videos__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nz-cs-videos__item .text-link {
  justify-self: start;
}

.nz-cs-videos__plain {
  color: var(--gray-text);
  font-size: 14.5px;
}

.nz-cs-records {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.nz-cs-files {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nz-cs-files .text-link {
  justify-self: start;
}

@media (max-width: 760px) {
  .nz-cs-records {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The related-records block sits in its own soft section; keep its
   internal spacing from doubling against the section padding. */
.nz-cs-section .nz-related {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
