/**
 * Quality Assurance Make page — site tokens + CE/CM chrome.
 * Top brand bars (not side rails); inspect/validate/release match CM/ME boards.
 */
body.make-site .qa-page {
  --nw-inner-max: 1440px;
  --qa-line: var(--nw-border);
  --qa-muted: var(--muted, #626d7d);
  --qa-ink: var(--ink, #171c29);
  --qa-blue: var(--main-color);
  --qa-soft: #f7f9fc;
  --qa-navy: #15263f;
  background: #fff;
  color: var(--qa-ink);
}

/* Hero: see nw-service-shared.css (.ce-hero.cm-hero-clean) */

/* —— 1 Gates: three-up cards, TOP brand bar (OEM prepare) —— */
body.make-site .qa-gates-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
body.make-site .qa-gate-card {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 30px 28px 26px;
  background: #fff;
  border: 1px solid var(--nw-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft, 0 4px 14px rgba(63, 61, 122, 0.04));
  transition: transform 0.28s var(--ease-lift, cubic-bezier(0.2, 0.7, 0.2, 1)),
    border-color 0.28s, box-shadow 0.28s, background 0.28s;
}
/* TOP brand bar — never a side rail */
/* topbar: .nw-svc-card.has-topbar */
body.make-site .qa-gate-card:hover,
body.make-site .qa-gate-card:focus-within {
  z-index: 1;
  transform: translateY(-4px);
  border-color: #c9d7ef;
  box-shadow: var(--shadow-card-hover, 0 8px 18px rgba(48, 57, 128, 0.075), 0 28px 55px rgba(82, 62, 153, 0.14));
  background: #fafbfe;
}
body.make-site .qa-gate-card:hover::before,
body.make-site .qa-gate-card:focus-within::before {
  opacity: 1;
  transform: scaleX(1);
}
body.make-site .qa-gate-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
body.make-site .qa-gate-no {
  font-size: var(--nw-fs-meta);
  font-weight: 550;
  color: var(--qa-blue);
  font-variant-numeric: tabular-nums;
}
body.make-site .qa-gate-phase {
  font-size: var(--nw-fs-meta);
  font-weight: 550;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #8192ad;
}
body.make-site .qa-gate-top > .icon {
  margin-left: auto;
  font-size: 26px;
  color: var(--qa-blue);
  transition: transform 0.25s, color 0.25s;
}
body.make-site .qa-gate-card:hover .icon {
  transform: translateY(-2px) scale(1.06);
}
body.make-site .qa-gate-card > h3 {
  margin: 0 0 12px;
  font-size: var(--nw-fs-title);
  font-weight: 550;
  letter-spacing: -0.45px;
  line-height: 1.3;
  color: #2a3f63;
  transition: color 0.25s;
}
body.make-site .qa-gate-card:hover > h3 { color: var(--qa-blue); }
body.make-site .qa-gate-card > p {
  margin: 0 0 22px;
  flex: 1;
  font-size: var(--nw-fs-secondary);
  line-height: 1.75;
  color: var(--qa-muted);
}
body.make-site .qa-gate-ref {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--qa-line);
}
body.make-site .qa-gate-ref > span {
  font-size:var(--nw-fs-meta);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #9aa9be;
}
body.make-site .qa-gate-ref > strong {
  font-size: var(--nw-fs-meta);
  font-weight: 550;
  letter-spacing: 0.2px;
  color: var(--qa-blue);
  line-height: 1.4;
}

/* —— 2 Inspect: left strip + TOP bar indicator (keep QA pattern; not process cards) —— */
body.make-site .qa-inspect-board {
  grid-template-columns: minmax(200px, 0.78fr) minmax(0, 2.22fr);
  min-height: 560px;
}
body.make-site .qa-inspect-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: 100%;
  min-height: 560px;
  background: #fafbfc;
  border-right: 1px solid var(--qa-line);
  z-index: 1;
}
body.make-site .qa-inspect-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  padding: 12px 20px;
  border: 0;
  border-bottom: 1px solid var(--qa-line);
  border-radius: 0;
  background: transparent;
  color: var(--qa-muted);
  text-align: left;
  cursor: pointer;
  font: inherit;
  box-shadow: none;
  overflow: hidden;
  transition: background 0.2s, color 0.2s;
}
body.make-site .qa-inspect-tab:last-child { border-bottom: 0; }
/* TOP brand bar — scaleX L→R; no left inset / no content shift */
body.make-site .qa-inspect-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--gradient-action, linear-gradient(110deg, var(--main-color) 0%, var(--main-color-hover) 34%, #615ced 100%));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s var(--ease-lift, cubic-bezier(0.2, 0.7, 0.2, 1));
  z-index: 2;
  pointer-events: none;
}
body.make-site .qa-inspect-tab[aria-selected="true"],
body.make-site .qa-inspect-tab.selected {
  z-index: 3;
  color: var(--qa-blue);
  background: linear-gradient(180deg, #f0f5ff 0%, #f7f9ff 55%, #fafbfe 100%);
  font-weight: 650;
  border-color: transparent;
  box-shadow: none;
}
body.make-site .qa-inspect-tab[aria-selected="true"]::after,
body.make-site .qa-inspect-tab.selected::after {
  transform: scaleX(1);
}
body.make-site .qa-inspect-tab:hover:not([aria-selected="true"]) {
  background: #f5f7ff;
  color: #2a3f63;
  border-color: transparent;
  box-shadow: none;
}
body.make-site .qa-inspect-tab:hover:not([aria-selected="true"])::after {
  transform: scaleX(0.32);
}
body.make-site .qa-inspect-tab-no {
  width: 34px;
  height: 34px;
  font-size: var(--nw-fs-meta);
}
body.make-site .qa-inspect-tab-label {
  min-width: 0;
  font-size: var(--nw-fs-secondary);
  line-height: 1.35;
  font-weight: 550;
}

/* Stage: shared visual (crossfade) + stacked copy panels */
body.make-site .qa-inspect-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 560px;
  background: #f4f7fb;
  min-width: 0;
}
body.make-site .qa-inspect-visual {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: #eef2f7;
  overflow: hidden;
}
body.make-site .qa-inspect-visual .nw-svc-stage-frames {
  position: absolute;
  inset: 0;
  z-index: 0;
}
body.make-site .qa-inspect-badge {
  position: absolute;
  left: 20px;
  top: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 40px);
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(var(--main-color-rgb), 0.18);
  box-shadow: 0 8px 22px rgba(21, 38, 63, 0.14);
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
body.make-site .qa-inspect-badge > em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--gradient-action, linear-gradient(110deg, var(--main-color) 0%, var(--main-color-hover) 34%, #615ced 100%));
  color: #fff;
  font-style: normal;
  font-size: var(--nw-fs-meta);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
body.make-site .qa-inspect-badge > span {
  font-size: var(--nw-fs-meta);
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #243752;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.make-site .qa-inspect-copies {
  display: grid;
  min-width: 0;
  min-height: 0;
  background: #f8fafe;
}
body.make-site .qa-inspect-copy {
  grid-area: 1 / 1;
  padding: clamp(28px, 2.8vw, 38px) clamp(24px, 2.6vw, 36px);
  background: #f8fafe;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  box-sizing: border-box;
  z-index: 0;
}
body.make-site .qa-inspect-copy[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}
body.make-site .qa-inspect-copy:not([hidden]) {
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
body.make-site .qa-inspect-kicker {
  margin: 0;
  font-size:var(--nw-fs-meta);
  font-weight: 650;
  letter-spacing: 1.1px;
  color: var(--qa-blue);
  text-transform: uppercase;
}
body.make-site .qa-inspect-copy > h3 {
  margin: 0;
  width: 100%;
  min-height: calc(1.22em * 2);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.22;
  letter-spacing: -0.6px;
  font-weight: 450;
  color: #243752;
}
body.make-site .qa-inspect-text {
  margin: 0;
  width: 100%;
  min-height: calc(1.7em * 2);
  font-size: var(--nw-fs-secondary);
  line-height: 1.7;
  color: var(--qa-muted);
}
body.make-site .qa-inspect-copy > .button {
  margin-top: auto;
  align-self: flex-start;
  width: fit-content;
}
body.make-site .qa-spec {
  margin: 2px 0 0;
  width: 100%;
  padding: 0;
}
body.make-site .qa-spec > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  border-top: 1px solid var(--qa-line);
  padding: 11px 0;
  line-height: 1.6;
}
body.make-site .qa-spec > div:last-child {
  border-bottom: 1px solid var(--qa-line);
}
body.make-site .qa-spec dt {
  margin: 0;
  font-size: var(--nw-fs-meta);
  font-weight: 550;
  color: #8495ae;
}
body.make-site .qa-spec dd {
  margin: 0;
  font-size: var(--nw-fs-secondary);
  color: #617696;
}

/* Validate pair: .nw-svc-pair in nw-service-shared.css */
/* —— 3 Validate: CM panel paired board —— */
body.make-site .qa-spec-stack {
  margin-top: 2px;
}
body.make-site .qa-spec-stack > div {
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 12px 0;
}

/* Release panel: .nw-svc-panel in nw-service-shared.css */

/* —— Responsive —— */
@media (max-width: 1100px) {
  body.make-site .qa-inspect-board {
    grid-template-columns: 1fr;
  }
  body.make-site .qa-inspect-nav {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-right: 0;
    border-bottom: 1px solid var(--qa-line);
    min-height: 0;
    height: auto;
  }
  body.make-site .qa-inspect-tab {
    flex: 0 0 auto;
    min-width: 148px;
    min-height: 52px;
    border-bottom: 0;
    border-right: 1px solid var(--qa-line);
  }
  body.make-site .qa-inspect-stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  body.make-site .qa-inspect-visual {
    min-height: 280px;
    aspect-ratio: 16 / 10;
  }
}
@media (max-width: 860px) {
  body.make-site .qa-gates-list {
    grid-template-columns: 1fr;
  }
  body.make-site .qa-spec > div,
  body.make-site .qa-spec-stack > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Inspect board reuses homepage process; keep QA spec list spacing */
body.make-site .qa-inspect .process-copy .qa-spec {
  margin: 16px 0 0;
}

/* QA inspect board: phone + tablet height behavior (homepage process unchanged) */
@media (max-width: 960px) {
  /* Force 1-col even in the 901–960 gap where nw-process still uses 2-col. */
  body.make-site .qa-inspect.nw-process .process-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    align-items: start;
    /* overflow-x:hidden + overflow-y:visible computes to overflow-y:auto
       (CSS quirk) and can clip the stacked copy. Keep overflow visible;
       photo/copy carry the board radius so the corners still clip. */
    overflow: visible;
  }
  body.make-site .qa-inspect.nw-process .process-photo {
    border-radius: 10px 10px 0 0;
  }
  body.make-site .qa-inspect.nw-process .process-copy {
    border-radius: 0 0 10px 10px;
  }
  body.make-site .qa-inspect.nw-process .process-detail,
  body.make-site .qa-inspect.nw-process .process-panel {
    flex: 0 0 auto;
    flex-direction: column;
    height: auto;
    max-height: none;
    min-height: auto;
    overflow: visible;
    align-self: start;
  }
  /* Photo must not flex-grow/shrink and steal room from the copy. */
  body.make-site .qa-inspect.nw-process .process-photo {
    flex: 0 0 auto !important;
    height: auto;
    max-height: none;
  }
  body.make-site .qa-inspect.nw-process .process-copy,
  body.make-site .qa-inspect.nw-process .process-copy-swap {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    height: auto;
    max-height: none;
    overflow: visible !important;
  }
}

/* Tablet 961–1279: even-stretch the 8 tabs to the full board so the last
   tab sits on the bottom edge (no leftover gap). JS locks the board to
   2× the tallest copy; photo and copy are each 50%, so the photo bottom
   meets the 4th tab. Phone / PC / homepage are unchanged. */
@media (min-width: 961px) and (max-width: 1279px) {
  body.make-site .qa-inspect.nw-process .process-layout {
    align-items: stretch;
    height: auto; /* JS sets a definite 2×maxCopy height */
    max-height: none;
  }
  body.make-site .qa-inspect.nw-process .process-detail,
  body.make-site .qa-inspect.nw-process .process-panel {
    height: 100%;
    max-height: none;
    min-height: 0;
    flex-direction: column;
    align-self: stretch;
    overflow: visible;
  }
  body.make-site .qa-inspect.nw-process .process-photo {
    flex: 0 0 50%;
    width: 100%;
    height: 50%;
    max-height: 50%;
    /* Beat nw-process @1100 and nw-tablet clamp(...) !important. */
    min-height: 0 !important;
    align-self: stretch;
  }
  body.make-site .qa-inspect.nw-process .process-copy {
    flex: 0 0 50%;
    width: 100%;
    max-width: none;
    height: 50%;
    max-height: none;
    overflow: visible;
  }
  body.make-site .qa-inspect.nw-process .process-copy-swap {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.make-site .qa-inspect.nw-process .process-tabs {
    height: 100%;
    align-self: stretch;
    grid-template-rows: repeat(var(--nw-process-tabs, 8), 1fr);
  }
  body.make-site .qa-inspect.nw-process .process-tabs button {
    height: auto;
    min-height: 0;
    align-self: stretch;
  }
}
