/* ===========================================================================
   제품소개 — 순로구분기 구간: 원리 · 예시 · 두 방식

   products.css 가 줄 수 한도에 닿아 순로구분기 구간만 떼어 둔다. 같은 페이지만 받는다.

   두 방식(2-Pass · 3-Pass)은 같은 항목을 같은 높이에 놓아야 견줘진다. 넓은 화면에서
   두 카드가 바깥 격자의 줄을 나눠 쓴다(subgrid). 모르는 브라우저는 제 높이로 쌓는다.
   =========================================================================== */

/* ── 원리 ────────────────────────────────────────────────── */

.seq-principle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--nx-sp-16);
  align-items: center;
  margin: var(--nx-sp-20) 0;
}

.seq-principle__title {
  margin-bottom: var(--nx-sp-5);
  font-size: var(--nx-fs-2xl);
  line-height: 1.1;
  letter-spacing: var(--nx-tracking-tight);
}

.seq-principle__body {
  font-size: var(--nx-fs-md);
  line-height: 1.55;
  color: var(--nx-text-2);
}

/* 식은 크게 세우고 뜻은 옆에 작게 적는다. 큰 숫자 콜아웃과 같은 방식이다. */
.seq-formula {
  display: flex;
  align-items: center;
  gap: var(--nx-sp-5);
  margin: var(--nx-sp-8) 0;
  font-size: var(--nx-fs-base);
  font-weight: 500;
  line-height: 1.45;
  color: var(--nx-text);
}

.seq-formula__expr {
  flex-shrink: 0;
  font-size: var(--nx-fs-3xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--nx-tracking-tight);
  color: var(--nx-link);
}

/* 위첨자가 줄 높이를 밀어 올리지 않게 줄 높이를 비우고 높이만 직접 준다. */
.seq-formula__expr sup {
  margin-left: 2px;
  font-size: 0.52em;
  line-height: 0;
  vertical-align: 0.82em;
}

/* ── 예시: 10칸 · 2패스 ──────────────────────────────────
   칸 상자 열 개를 두 번 그린다. 그 패스가 보는 자리의 숫자만 파랗게 칠해,
   왜 그 칸으로 갔는지 숫자에서 바로 읽히게 한다. */

/* 예시와 두 방식은 같은 카드 면이다. 구간 바탕과 반대 색으로 띄운다. */
.radix,
.seqtype {
  margin: 0;
  padding: var(--nx-sp-8);
  border-radius: var(--nx-r-2xl);
  background: var(--nx-bg-sunken);
}

.section--sunken .radix,
.section--sunken .seqtype {
  background: var(--nx-bg-base);
}

.radix__cap {
  margin-bottom: var(--nx-sp-6);
  font-size: var(--nx-fs-sm);
  line-height: 1.5;
  color: var(--nx-text-2);
}

.radix__cap b {
  margin-right: var(--nx-sp-2);
  font-weight: 600;
  color: var(--nx-text);
}

.radix__row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--nx-sp-3);
  align-items: center;
}

.radix__row + .radix__row {
  margin-top: var(--nx-sp-3);
}

.radix__tag {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--nx-text);
}

.radix__tag small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--nx-text-2);
}

.radix__seq {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.radix__seq b,
.radix__pockets b {
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--nx-s3);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  color: var(--nx-text);
}

.radix__pockets em {
  font-style: normal;
  color: var(--nx-link);
}

/* 마지막 줄은 결과다. 파랑으로 채워 끝났다는 것을 알린다. */
.radix__row--out b {
  background: var(--nx-accent);
  color: var(--nx-text-on-accent);
}

.radix__pockets {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
}

.radix__pockets li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 70px;
  padding: 4px 0 6px;
  border: 1px solid var(--nx-border);
  border-radius: 6px;
}

.radix__pockets li.is-full {
  border-color: var(--nx-border-strong);
}

.radix__pockets i {
  font-size: 11px;
  font-style: normal;
  color: var(--nx-text-2);
}

/* ── 두 방식 ─────────────────────────────────────────────── */

.seq-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--nx-sp-5);
}

.seqtype {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: var(--nx-sp-6);
}

.seqtype__family {
  display: block;
  margin-bottom: var(--nx-sp-1);
  font-size: var(--nx-fs-sm);
  font-weight: 600;
  color: var(--nx-text-2);
}

.seqtype__name {
  font-size: var(--nx-fs-2xl);
  letter-spacing: var(--nx-tracking-tight);
}

.seqtype__statement {
  margin-top: var(--nx-sp-3);
  font-size: var(--nx-fs-md);
  font-weight: 600;
  line-height: 1.4;
  color: var(--nx-text);
}

.seqtype__body {
  margin-top: var(--nx-sp-2);
  font-size: var(--nx-fs-base);
  line-height: 1.55;
  color: var(--nx-text-2);
}

.seqtype__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--nx-sp-3);
  margin: 0;
}

.seqtype__facts dt {
  font-size: 13px;
  color: var(--nx-text-2);
}

.seqtype__facts dd {
  margin: 2px 0 0;
  font-size: var(--nx-fs-2xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: var(--nx-tracking-tight);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.seqtype__facts small {
  margin-left: 2px;
  font-size: 0.45em;
  font-weight: 500;
}

.seqtype__formula,
.seq-closing {
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-2);
}

.seq-closing {
  max-width: 46em;
  margin-top: var(--nx-sp-10);
  font-size: var(--nx-fs-base);
  line-height: 1.6;
}

/* ── 좁은 화면 ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .seq-principle {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--nx-sp-10);
    margin: var(--nx-sp-16) 0;
  }
  .seq-types {
    grid-template-columns: minmax(0, 1fr);
  }
  .seqtype {
    grid-row: auto;
    grid-template-rows: none;
  }
}

@media (max-width: 720px) {
  .radix,
  .seqtype {
    padding: var(--nx-sp-5);
    border-radius: var(--nx-r-xl);
  }
  /* 칸 상자 열 개가 한 줄에 서야 한다. 이름표를 위로 올려 상자에 폭을 다 준다. */
  .radix__row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--nx-sp-2);
  }
  .radix__tag small {
    display: inline;
    margin-left: var(--nx-sp-1);
  }
  .radix__pockets {
    gap: 3px;
  }
  .radix__pockets b {
    padding: 3px 2px;
    font-size: 12px;
  }
  .seqtype__facts {
    gap: var(--nx-sp-2);
  }
}
