/* ============================================================
   Manufacturing & Quality Control page — section layout
   Continues the established page grammar: alternating white /
   light-grey sections, an intro split whose picture slot is
   stretched to the copy column's height (the Warranty page's
   absolute-fill pattern), green-edge fact cards, blue numbered
   gates and steps, and commitment cards. Colours and type come
   from tokens.css; .eyebrow, .section-heading and .text-link are
   global (site.css). Local prefix: nz-mq-.
   ============================================================ */

.nz-mq {
  overflow-x: clip;
}

/* ---- Section rhythm ---- */
.nz-mq-section {
  padding: 88px 0;
}

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

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

/* ---- Optional WordPress editor body ---- */
.nz-mq-extra {
  max-width: 78ch;
}

.nz-mq-extra > *:last-child {
  margin-bottom: 0;
}

/* ---- Wide picture slot under the page header ---- */
.nz-mq-banner {
  padding-top: 44px;
  background: var(--white);
}

/* ---- Boundary notes: same grammar as the Testing page's nz-ti-note ---- */
.nz-mq-note {
  max-width: 62ch;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--gray-line);
  color: var(--gray-text);
  font-size: 14px;
  line-height: 1.6;
}

.nz-mq-note--wide {
  max-width: 78ch;
  margin-top: 28px;
}

/* ---- Fact cards: same grammar as the Delivery page's nz-del-facts ---- */
.nz-mq-facts {
  max-width: 620px;
  margin: 32px 0 0;
  padding: 4px 20px;
  border: 1px solid var(--gray-line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--white);
}

.nz-mq-fact {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 3px 22px;
  padding: 11px 0;
}

.nz-mq-fact + .nz-mq-fact {
  border-top: 1px solid var(--gray-line);
}

.nz-mq-fact dt {
  padding-top: 2px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nz-mq-fact dd {
  margin: 0;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .nz-mq-facts {
    padding: 2px 16px;
  }

  .nz-mq-fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 10px 0;
  }
}

/* ---- Our factory: copy beside the who-builds-what panel ---- */
.nz-mq-intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  /* stretch, not start: the right side must reach the copy column's height
     so its picture slot can fill what the panel leaves over. */
  align-items: stretch;
}

.nz-mq-intro__copy h2 {
  margin-bottom: 18px;
}

.nz-mq-intro__copy > p {
  max-width: 62ch;
}

.nz-mq-intro__copy-media {
  margin-top: 30px;
}

.nz-mq-intro__panel {
  border: 1px solid var(--gray-line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px 26px;
}

.nz-mq-intro__panel h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

/* ---- Right column: panel over a picture slot that fills the height the
        copy column leaves, so both sides of the split end level ---- */
.nz-mq-intro__side {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.nz-mq-intro__panel-media {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1025px) {
  /* flex-basis 0: the slot's own 4:3 height does not count towards the row;
     it claims only the height left over after the panel. The 300px floor
     keeps the slot from becoming a sliver on odd viewport widths. */
  .nz-mq-intro__panel-media {
    flex: 1 1 0;
    min-height: 300px;
  }

  .nz-mq-intro__panel-media .nz-ph {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    margin: 0;
  }

  .nz-mq-intro__panel-media .nz-ph__img {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    object-fit: cover;
  }
}

.nz-mq-builder + .nz-mq-builder {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-line);
}

.nz-mq-builder h4 {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
}

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

.nz-mq-builder__note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--gray-line);
  color: var(--gray-text);
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .nz-mq-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .nz-mq-intro__side {
    gap: 20px;
  }
}

/* ---- Production release: numbered gates, same grammar as the
        Delivery page's nz-del-gate ---- */
.nz-mq-gates {
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.nz-mq-gate {
  display: flex;
  gap: 18px;
  padding: 16px 0;
}

.nz-mq-gate + .nz-mq-gate {
  border-top: 1px solid var(--gray-line);
}

.nz-mq-gate__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: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.nz-mq-gate__body strong {
  display: block;
  color: var(--blue);
  font-size: 16px;
  font-weight: 600;
}

.nz-mq-gate__body p {
  margin: 4px 0 0;
  max-width: 62ch;
  color: var(--gray-text);
  font-size: 14px;
  line-height: 1.6;
}

/* ---- Production progress points: numbered nodes ---- */
.nz-mq-flowtitle {
  margin-top: 48px;
  font-size: 18px;
}

.nz-mq-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: nz-mq-step;
}

.nz-mq-step {
  padding: 14px 16px;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.nz-mq-step__num {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1024px) {
  .nz-mq-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

/* ---- Factory checks: copy beside the photo, both ending level ---- */
.nz-mq-checks {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: start;
}

.nz-mq-checks__copy h2 {
  margin-bottom: 18px;
}

.nz-mq-checks__copy > p {
  max-width: 62ch;
}

.nz-mq-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.nz-mq-checklist li {
  padding: 10px 14px;
  border: 1px solid var(--gray-line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}

.nz-mq-checks__links {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.nz-mq-checks__links .text-link {
  justify-self: start;
}

.nz-mq-checks__media {
  margin-top: 6px;
}

@media (min-width: 1025px) {
  /* The equal-height pattern proven on the Warranty page intro: at desktop
     the slot leaves the flow entirely, so the row is sized by the copy
     column alone; top:0/bottom:0 then give the slot exactly the copy
     column's height, and the picture crops inside it (object-fit: cover).
     The width mirrors the 5fr track: (container - gap) x 5/12. */
  .nz-mq-checks__media {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: calc((100% - 56px) * 5 / 12);
    display: flex;
    flex-direction: column;
    margin-top: 0;
  }

  /* The grid must be the positioning context for the abs-posed slot. */
  .nz-mq-checks {
    position: relative;
  }

  .nz-mq-checks__media .nz-ph {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .nz-mq-checks__media .nz-ph__img {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    object-fit: cover;
  }
}

@media (max-width: 1024px) {
  .nz-mq-checks {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

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

/* ---- Performance responsibility: two commitment cards and the ladder ---- */
.nz-mq-commit {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 20px;
  margin-top: 44px;
}

.nz-mq-commitcard {
  padding: 22px 24px;
  border: 1px solid var(--gray-line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--white);
}

.nz-mq-commitcard h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.nz-mq-commitcard p {
  margin: 0;
  color: var(--gray-text);
  font-size: 14.5px;
  line-height: 1.65;
}

.nz-mq-ladder {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.nz-mq-ladderstep {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 16px 0;
}

.nz-mq-ladderstep + .nz-mq-ladderstep {
  border-top: 1px solid var(--gray-line);
}

.nz-mq-ladderstep p {
  margin: 0;
  max-width: 74ch;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.65;
}

.nz-mq-commit__links {
  margin-top: 28px;
}

.nz-mq-commit__links .text-link {
  justify-self: start;
}

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