/* Sapie-Agent 지면 전용 — 연결 장의 위 판(Agent 소개)을 걷어 아래 판만 혼자 남을 때 */
.tstack--solo > .tstack__layer--base:first-child {
  margin-top: 0;
  padding-top: clamp(32px, 4vw, 64px);
}
.tstack--solo + .footnote a {
  color: var(--text-primary);
  font-weight: 600;
}

/* 기본 에이전트 장(가로로 넘기는 카드 6장) — 넓은 화면에서만
   · 첫 화면에 카드 3장이 꼭 맞게: 오른쪽 끝 카드가 잘린 채로 보이던 것 정리
   · 카드 묶음을 화면 세로 가운데로: 카드 아래 빈 검은 바탕이 크게 남던 것 정리 */
@media (min-width: 1080px) {
  html.js-stage .bu .cstack--sol.cstack--n6 .cstack__pin {
    align-content: center;
    padding-top: 0;
  }
  html.js-stage .bu .cstack--sol.cstack--n6 .cstack__list {
    --cw: calc((100cqw - 2 * var(--cg)) / 3);
  }
  /* 가운데 맞춘 판 아래 여백이 이미 있으니 장 아래 여백은 뺀다 */
  html.js-stage .bu #s-scope {
    padding-bottom: 0;
  }
}

/* INTEGRATION 장 — 토스 비즈니스(쇼핑) 입점 단계 배치 따라 하기
   · 왼쪽 큰 회색 판 + 가운데 흰 카드(단계별 표) / 오른쪽 번호 단계 목록
   · 고른 단계만 진하게 · 설명 펼침. 단계 바꾸기는 assets/js/sapie-agent.js */
.isteps {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: clamp(32px, 3.4vw, 56px);
  align-items: center;
}
.isteps__stage {
  display: grid;
  place-items: center;
  min-height: clamp(440px, 40vw, 600px);
  padding: clamp(32px, 4vw, 64px) 24px;
  background: var(--bg-panel);
  border-radius: 40px;
}
.isteps__card {
  grid-area: 1 / 1;
  width: min(100%, 540px);
  padding: clamp(32px, 3.4vw, 48px) clamp(24px, 2.6vw, 38px);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
}
.isteps__title {
  margin: 0 0 clamp(28px, 2.8vw, 40px);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
}
.isteps__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.isteps__table th,
.isteps__table td {
  padding: var(--sp-3) 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-control);
}
.isteps__table tr:last-child td { border-bottom: 0; }
.isteps__table th {
  font-weight: 500;
  color: var(--text-primary);
}
.isteps__table td { color: var(--text-secondary); }
.isteps__table th:last-child,
.isteps__table td:last-child { width: 40%; }
.isteps__ok {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.isteps__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.isteps__step {
  position: relative;
  padding-left: 46px;
  padding-bottom: 40px;
}
.isteps__step:last-child { padding-bottom: 0; }
/* 번호 사이 가는 세로선 */
.isteps__step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 38px;
  bottom: 10px;
  width: 1px;
  background: var(--border-strong);
}
.isteps__btn {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: -46px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text-faint);
  transition: color var(--dur-hover) var(--ease);
}
.isteps__n {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-circle);
  background: var(--border-strong);
  color: var(--bg-card);
  font-size: var(--fs-2xs);
  font-weight: 700;
  transition: background var(--dur-hover) var(--ease);
}
.isteps__name {
  font-size: var(--fs-h3-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-base);
}
.isteps__desc {
  margin: 14px 0 0;
  max-width: 30em;
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--text-secondary);
}
.isteps__btn:hover { color: var(--text-secondary); }
.isteps__step.is-on .isteps__btn { color: var(--text-primary); }
.isteps__step.is-on .isteps__n { background: var(--text-primary); }

/* 스크립트가 켜졌을 때만 한 장씩 (스크립트 없으면 카드 · 설명 모두 보임) */
.isteps.is-ready .isteps__card {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur-content) var(--ease), transform var(--dur-content) var(--ease-out), visibility 0s linear var(--dur-content);
}
.isteps.is-ready .isteps__card.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.isteps.is-ready .isteps__desc { display: none; }
.isteps.is-ready .is-on .isteps__desc { display: block; }
.isteps:not(.is-ready) .isteps__card + .isteps__card { margin-top: var(--sp-4); }
.isteps:not(.is-ready) .isteps__stage { display: block; }
.isteps:not(.is-ready) .isteps__card { margin-inline: auto; }

.isteps + .footnote a {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 960px) {
  .isteps { grid-template-columns: minmax(0, 1fr); }
  .isteps__stage {
    min-height: 0;
    padding: 28px var(--sp-4);
    border-radius: var(--radius-xl);
  }
  .isteps__step { padding-bottom: 28px; }
  .isteps + .footnote { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .isteps.is-ready .isteps__card { transform: none; transition: none; }
}

/* 깔끔하게(2026-10-29, ADP 지면 결 맞추기)
   · 장 머리: 제목 왼쪽 · 설명 오른쪽 끝 → 제목 바로 아래 설명(ADP와 같은 세로 쌓기)
   · 문제 장: 사진 + 세 칸 줄 → 위쪽 가는 선으로 나눈 2×2 칸
   · 구성 장: 흰 카드 4장 → 카드 걷고 위쪽 가는 선 4칸
   · 활용 · 진행 방식 장 바탕은 HTML에서 밝게(검정은 기본 에이전트 · 마무리만) */
.bu--sapie-agent .section__head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 62ch;
  align-items: start;
}
.bu--sapie-agent .section__head--split :is(.eyebrow, h2, p:not(.eyebrow)) {
  grid-column: 1;
  grid-row: auto;
}
.bu--sapie-agent .section__head--split > h2 + p:not(.eyebrow) {
  margin-top: var(--sp-2);
}

.agrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 4vw, 72px);
  row-gap: clamp(40px, 3.6vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.agrid__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 10px;
  padding-top: 24px;
  align-content: start;
  border-top: 1px solid var(--border-strong);
}
.agrid__n {
  grid-row: 1 / span 2;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: var(--lh-body);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.agrid__title {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--text-primary);
}
.agrid__desc {
  margin: 0;
  max-width: 34em;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text-secondary);
}

.bu--sapie-agent #s-challenge-2 .tiles {
  column-gap: clamp(24px, 2.6vw, 40px);
}
.bu--sapie-agent #s-challenge-2 .tile {
  align-content: start;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  border-top: 0;
  box-shadow: none;
  transform: none;
}
.bu--sapie-agent #s-challenge-2 .tile__glyph {
  order: -1;
}

/* 활용 장: 밝은 바탕으로 옮기며 검은 판 → 회색 판, 글자색 어둡게 */
.bu--sapie-agent #s-useCases {
  --text-on-inverse: var(--text-primary);
  --text-on-inverse-muted: var(--text-secondary);
  --border-inverse: var(--border-strong);
}
.bu--sapie-agent #s-useCases .uct__panel {
  background: var(--bg-panel);
}
/* 고른 줄: 둥근 상자 대신 글자만 진하게 */
html.js-pillars .bu--sapie-agent #s-useCases .uct__row,
html.js-pillars .bu--sapie-agent #s-useCases .uct__row.is-on {
  background: transparent;
  padding-inline: 0;
}
html.js-pillars .bu--sapie-agent #s-useCases .uct__row:not(.is-on) {
  color: var(--text-faint);
}

@media (max-width: 760px) {
  .agrid { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-6); }
  .bu--sapie-agent #s-challenge-2 .tiles { row-gap: var(--sp-6); }
  .agrid__title { font-size: var(--fs-h4); }
  .agrid__desc { font-size: var(--fs-sm); }
}

/* ── 문제 장: 사례 네 칸(2026-10-29) — 세로 가는 선으로 나눈 4열, 역할 · 한마디 · 이어 보기 ── */
.acase {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(32px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.acase__item {
  display: flex;
  flex-direction: column;
  padding: var(--sp-1) 0 0;
}
.acase__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-circle);
  background: var(--bg-panel);
  color: var(--text-secondary);
}
.acase__who {
  margin: 48px 0 0;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.acase__quote {
  margin: 10px 0 0;
}
.acase__quote p {
  margin: 0;
  font-size: var(--fs-h3-sm);
  font-weight: 700;
  line-height: 1.55;
  color: var(--text-primary);
  word-break: keep-all;
}
.acase__more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: 24px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}
.acase__more svg { flex: none; color: var(--text-primary); transition: transform var(--dur-hover) var(--ease); }
.acase__more:hover svg { transform: translateX(3px); }
.acase__more:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 1100px) {
  .acase { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 48px; }
}
@media (max-width: 760px) {
  .acase { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .acase__item { padding: 20px 0; }
  .acase__item:last-child { padding-bottom: 0; }
  .acase__who { margin-top: 20px; }
  .acase__quote p { font-size: var(--fs-body); }
}
@media (prefers-reduced-motion: reduce) { .acase__more svg { transition: none; } }

/* ── 활용 장: 토스식 그림 카드 두 장(2026-10-29) — 회색 그림 판 + 아래 제목 · 설명 ── */
.ucard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 2.6vw, 40px);
}
.ucard__item { display: flex; flex-direction: column; }
.ucard__art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  padding: clamp(24px, 3vw, 48px);
  border-radius: 32px;
  background: var(--bg-panel);
  color: var(--text-primary);
  overflow: hidden;
}
.ucard__title {
  margin: 28px 0 0;
  padding-inline: var(--sp-1);
  font-size: var(--fs-h3-lg);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--text-primary);
}
.ucard__desc {
  margin: 10px 0 0;
  padding-inline: var(--sp-1);
  max-width: 34em;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text-secondary);
  word-break: keep-all;
}

/* 활용 장 그림(2026-10-29, 2차 채우기) — 회색 판 위 흰 조각만, 판을 가로로 꽉 채운다
   그림 1: 질문 → 실적 · 문서 두 곳 → 한 번에 정리 / 그림 2: 측정값 이상 구간 → 에이전트 세 개 */
.ucard__art.uca {
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: clamp(24px, 2.8vw, 40px);
}
.uca-ask {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0 0 18px;
  padding: var(--sp-3) 18px;
  border-radius: 20px 20px var(--radius-xs) 20px;
  background: var(--bg-card);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.uca-ask__who {
  flex: none;
  padding: 3px var(--sp-2);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--text-secondary);
}
.uca-row { display: grid; gap: var(--sp-3); }
.uca-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.uca-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.uca-tile,
.uca-done,
.uca-chart {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.uca-tile { flex-wrap: wrap; }
.uca-tile--col { flex-direction: column; align-items: flex-start; gap: 10px; }
.uca-tile--col b { font-size: var(--fs-sm); font-weight: 700; color: var(--text-primary); }
.uca-chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
}
.uca-chip--on { background: var(--text-primary); }
.uca-ic {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.uca-chip--on .uca-ic { stroke: var(--bg-card); stroke-width: 2.2; }
.uca-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.uca-txt b { font-size: var(--fs-sm); font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.uca-txt small { font-size: var(--fs-2xs); color: var(--text-secondary); white-space: nowrap; }
/* 조각 아래 작은 내용 미리보기: 막대 · 글줄 */
.uca-bars,
.uca-lines {
  display: flex;
  flex-basis: 100%;
  height: 34px;
  padding-top: var(--sp-1);
  border-top: 1px solid var(--border-control);
}
.uca-bars { align-items: flex-end; gap: 6px; padding-top: var(--sp-2); }
.uca-bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 3px 3px 0 0; background: var(--bg-panel); }
.uca-bars i:nth-child(4) { background: var(--text-secondary); }
.uca-lines { flex-direction: column; justify-content: center; gap: 6px; }
.uca-lines i { display: block; height: 4px; border-radius: 2px; background: var(--bg-panel); }
.uca-lines i:nth-child(2) { width: 82%; background: var(--c-accent-50, var(--bg-panel)); box-shadow: inset 0 0 0 1px var(--text-accent); }
.uca-lines i:nth-child(3) { width: 60%; }
.uca-wire { display: block; width: 100%; height: 28px; overflow: visible; }
.uca-wire path { fill: none; stroke: var(--border-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.uca-done { background: var(--text-primary); }
.uca-done .uca-txt b { color: var(--bg-card); }
.uca-done .uca-txt small { color: var(--c-neutral-400); }
.uca-done .uca-chip--on { background: var(--bg-card); }
.uca-done .uca-chip--on .uca-ic { stroke: var(--text-primary); }
.uca-tags { display: flex; gap: 6px; }
.uca-tags em {
  padding: var(--sp-1) 10px;
  border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22);
  font-size: var(--fs-2xs);
  font-style: normal;
  font-weight: 600;
  color: var(--bg-card);
}
/* 그림 2 */
.uca-chart { flex-direction: column; align-items: stretch; gap: 10px; }
.uca-chart__head { display: flex; align-items: center; gap: var(--sp-3); }
.uca-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--text-accent);
}
.uca-flag i { width: 6px; height: 6px; border-radius: var(--radius-circle); background: var(--c-accent-500); }
.uca-plot { position: relative; display: block; height: clamp(64px, 6vw, 92px); }
.uca-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.uca-grid { fill: none; stroke: var(--border-control); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.uca-band { fill: var(--c-accent-50, var(--bg-panel)); }
.uca-line { fill: none; stroke: var(--text-primary); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.uca-dot {
  position: absolute;
  left: 73.75%;
  top: 17.5%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: var(--radius-circle);
  background: var(--c-accent-500);
  box-shadow: 0 0 0 4px rgba(244, 159, 32, 0.22);
}

@media (max-width: 860px) {
  .ucard { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
}
@media (max-width: 480px) {
  .ucard__art { aspect-ratio: auto; min-height: 280px; padding: 28px var(--sp-4); border-radius: 24px; }
  .ucard__art.uca { padding: 20px 14px; }
  .uca-ask { font-size: var(--fs-xs); }
  .uca-row--2 { gap: var(--sp-2); }
  .uca-row--3 { gap: 6px; }
  .uca-tile { padding: var(--sp-3); gap: 10px; }
  .uca-tile--col b { font-size: var(--fs-xs); }
  .uca-txt b, .uca-txt small { white-space: normal; }
  .uca-tags { display: none; }
  .ucard__title { margin-top: 20px; font-size: var(--fs-h3); }
  .ucard__desc { font-size: var(--fs-sm); }
}

/* ── INTEGRATION 장 그림(2026-10-29, 2차) — 표 대신 '왼쪽 항목 → 선 → Sapie-Agent' 흐름 그림
   · 흰 카드를 걷고 회색 판 위에 흰 조각만 둔다(카드 안 카드 없음)
   · 2차: 판 여백 줄이고 그림 키움, 아이콘 칸 · 연결 상태 · 고르기 표시 · 선 끝 점 ── */
.isteps__stage {
  min-height: 0;
  padding: clamp(40px, 4vw, 56px) clamp(20px, 2.4vw, 36px);
}
.isteps__card {
  width: min(100%, 760px);
  padding: 0;
  background: none;
  border-radius: 0;
}
.isteps__title {
  margin-bottom: clamp(24px, 2.4vw, 32px);
  text-align: center;
}
.iflow {
  --wire: clamp(40px, 4.4vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 320px) var(--wire) auto;
  justify-content: center;
  align-items: center;
}
.iflow--3 {
  --wire: clamp(24px, 2.6vw, 40px);
  grid-template-columns: minmax(0, 1fr) var(--wire) auto var(--wire) minmax(0, 1fr);
}
.iflow--rev { grid-template-columns: auto var(--wire) minmax(0, 320px); }
.iflow__col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.iflow__tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--sp-4) 14px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
/* 선이 닿는 자리 작은 점 */
.iflow__tile::after,
.iflow__node::before,
.iflow__node::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: var(--radius-circle);
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
}
.iflow__col .iflow__tile::after { right: -4px; }
.iflow__col--out .iflow__tile::after { right: auto; left: -4px; }
.iflow__node::before { left: -4px; }
.iflow__node::after { right: -4px; }
.iflow:not(.iflow--3, .iflow--rev) .iflow__node::after,
.iflow--rev .iflow__node::before { content: none; }

.iflow__chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
}
.iflow__txt { display: grid; gap: 3px; min-width: 0; flex: 1; }
.iflow__txt b {
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  word-break: keep-all;
}
.iflow__txt small {
  font-size: var(--fs-2xs);
  color: var(--text-secondary);
}
.iflow__txt code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: var(--tracking-base);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.iflow__ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* 연결 상태 */
.iflow__state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--text-secondary);
}
.iflow__state i {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-circle);
  background: var(--text-accent);
}
/* 모델 고르기 */
.iflow__radio {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-circle);
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
}
.iflow__radio.is-on { box-shadow: inset 0 0 0 5px var(--text-primary); }
.iflow__tile.is-pick { box-shadow: 0 0 0 1.5px var(--text-primary); }
/* 권한 결과 */
.iflow__tile.is-ok .iflow__chip { background: var(--text-primary); }
.iflow__tile.is-ok .iflow__ic { stroke: var(--bg-card); stroke-width: 2.2; }
.iflow__tile.is-no { background: none; box-shadow: inset 0 0 0 1px var(--border-strong); }
.iflow__tile.is-no::after { background: var(--bg-panel); }
.iflow__tile.is-no .iflow__chip { background: none; box-shadow: inset 0 0 0 1px var(--border-strong); }
.iflow__tile.is-no :is(b, small) { color: var(--text-faint); }
.iflow__tile.is-no .iflow__ic { stroke: var(--text-faint); }

.iflow__wire {
  width: 100%;
  height: calc(100% - 72px);
  min-height: 56px;
  overflow: visible;
}
.iflow__wire path {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.iflow__wire--out { transform: scaleX(-1); }

.iflow__node {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 2px;
  min-width: 150px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--text-primary);
  color: var(--bg-card);
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.45);
}
.iflow__node b { font-size: var(--fs-body); font-weight: 700; letter-spacing: var(--tracking-base); }
.iflow__node small { font-size: var(--fs-2xs); color: var(--text-on-inverse-muted); }
.iflow__mark {
  display: grid;
  grid-template-columns: repeat(2, 6px);
  gap: 3px;
  margin-bottom: 10px;
}
.iflow__mark i { width: 6px; height: 6px; border-radius: var(--radius-circle); background: rgb(255 255 255 / 0.35); }
.iflow__mark i:first-child { background: var(--c-brand-dot); }
.iflow--3 .iflow__node { min-width: 0; padding-inline: var(--sp-4); }

@media (max-width: 1240px) and (min-width: 961px) {
  .iflow--3 .iflow__state,
  .iflow--3 .iflow__chip { display: none; }
}
@media (max-width: 560px) {
  /* 단계를 바꿔도 제목 자리가 흔들리지 않게 위로 붙인다 */
  .isteps__stage { padding: 24px var(--sp-4); align-items: start; }
  .isteps__title { text-align: left; }
  .iflow,
  .iflow--3,
  .iflow--rev { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
  .iflow__col { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .iflow__tile { flex-wrap: wrap; gap: 10px; padding: 14px; }
  .iflow__txt { flex-basis: 100%; }
  .iflow__state,
  .iflow__radio { position: absolute; top: 14px; right: 14px; }
  .iflow__tile::after,
  .iflow__node::before,
  .iflow__node::after,
  .iflow__wire { display: none; }
  .iflow__node { grid-template-columns: auto 1fr; align-items: center; column-gap: var(--sp-3); min-width: 0; padding: 14px var(--sp-4); }
  .iflow__mark { grid-row: span 2; margin: 0; }
}

/* ── 문제 장: 사례 카드(2026-10-29) — 흰 카드 안에 따옴표 · 한마디 · 말한 사람(아이콘 + 역할) · 이어 보기. 다음 장과 간격 넓힘 ── */
.bu--sapie-agent #s-challenge .acase { column-gap: 20px; row-gap: 20px; }
.bu--sapie-agent #s-challenge .acase__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto auto;
  grid-template-areas: "mark mark" "quote quote" "icon who" "more more";
  column-gap: var(--sp-3);
  padding: var(--sp-6) 28px 28px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
}
.bu--sapie-agent #s-challenge .acase__item::before {
  content: "\201C";
  grid-area: mark;
  height: 32px;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-accent);
}
.bu--sapie-agent #s-challenge .acase__quote { grid-area: quote; margin: var(--sp-3) 0 0; }
.bu--sapie-agent #s-challenge .acase__quote p { font-size: var(--fs-h4); line-height: var(--lh-body); }
.bu--sapie-agent #s-challenge .acase__icon { grid-area: icon; width: 44px; height: 44px; margin-top: var(--sp-6); }
.bu--sapie-agent #s-challenge .acase__icon svg { width: 20px; height: 20px; }
.bu--sapie-agent #s-challenge .acase__who {
  grid-area: who;
  align-self: center;
  margin: var(--sp-6) 0 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-primary);
}
.bu--sapie-agent #s-challenge .acase__more { grid-area: more; justify-self: start; margin-top: 20px; padding-top: 0; color: var(--text-secondary); }
.bu--sapie-agent #s-challenge-2 > .container { padding-top: var(--section-py); }
@media (max-width: 760px) {
  .bu--sapie-agent #s-challenge .acase { row-gap: var(--sp-3); }
  .bu--sapie-agent #s-challenge .acase__item { padding: 24px 20px var(--sp-5); }
  .bu--sapie-agent #s-challenge .acase__item:last-child { padding-bottom: var(--sp-5); }
  .bu--sapie-agent #s-challenge .acase__icon,
  .bu--sapie-agent #s-challenge .acase__who { margin-top: 24px; }
  .bu--sapie-agent #s-challenge .acase__quote p { font-size: var(--fs-body); }
}

/* ── INTEGRATION 장: 사막여우가 단계를 소개(2026-10-29) — 말풍선 제목 + 글이 차례로 나타남
   · 여우 그림은 HTML 맨 위 <symbol id="ifox-sym"> 한 벌을 가져다 씀(ADP 지면 여우와 같은 결, 웃는 얼굴)
   · 단계가 바뀔 때마다 말풍선 → 왼쪽 조각 → 선 → Sapie-Agent → 오른쪽 조각 순서로 나타남(.is-ready일 때만) ── */
.ifox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  order: 2;
  margin-top: clamp(16px, 1.8vw, 24px);
}
.isteps__card { display: flex; flex-direction: column; }
.ifox__fox {
  flex: none;
  width: clamp(84px, 8vw, 112px);
  height: auto;
  aspect-ratio: 140 / 120;
  overflow: visible;
  filter: drop-shadow(0 6px 10px rgb(20 20 19 / 0.08));
}
.ifox .ifox__bubble {
  position: relative;
  margin: 0;
  padding: 14px var(--sp-5);
  text-align: left;
  font-size: var(--fs-body);
  line-height: 1.5;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
}
/* 말풍선 꼬리: 여우 쪽(왼쪽) */
.ifox .ifox__bubble::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-radius: 3px;
  transform: translateY(-50%) rotate(45deg);
}
.ifox__bubble span { position: relative; display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .isteps.is-ready .is-on .ifox__fox { animation: ifox-bob 3s ease-in-out infinite, ifox-in 0.5s var(--ease-out) 1.9s both; }
  .isteps.is-ready .is-on .ifox__bubble { animation: ifox-pop 0.45s var(--ease-out) 2.05s both; }
  .isteps.is-ready .is-on .ifox__bubble span { animation: ifox-type 0.9s steps(18, end) 2.2s both; }

  .isteps.is-ready .is-on :is(.iflow__tile, .iflow__node) {
    animation: ifox-rise 0.5s var(--ease-out) both;
    animation-delay: calc(0.2s + var(--i, 0) * 0.25s);
  }
  .isteps.is-ready .is-on .iflow__wire { animation: ifox-fade 0.5s var(--ease) both; animation-delay: calc(0.25s + var(--i, 0) * 0.25s); }
  /* 조각 안 글은 조각이 나타난 뒤 한 박자 늦게 */
  .isteps.is-ready .is-on .iflow__txt,
  .isteps.is-ready .is-on .iflow__node :is(b, small),
  .isteps.is-ready .is-on .iflow__state,
  .isteps.is-ready .is-on .iflow__radio {
    animation: ifox-fade 0.5s var(--ease) both;
    animation-delay: calc(0.4s + var(--i, 0) * 0.25s);
  }
  /* 순서: 왼쪽 1·2 → 선 → 가운데 → 선 → 오른쪽 */
  .is-on .iflow__col:not(.iflow__col--out) .iflow__tile:nth-child(1) { --i: 0; }
  .is-on .iflow__col:not(.iflow__col--out) .iflow__tile:nth-child(2) { --i: 1; }
  .is-on .iflow__wire:not(.iflow__wire--out) { --i: 2; }
  .is-on .iflow__node { --i: 3; }
  .is-on .iflow__wire--out { --i: 4; }
  .is-on .iflow__col--out .iflow__tile:nth-child(1) { --i: 5; }
  .is-on .iflow__col--out .iflow__tile:nth-child(2) { --i: 6; }
  /* 모델 고르기 단계(가운데가 먼저, 오른쪽이 바깥) */
  .is-on .iflow--rev .iflow__node { --i: 0; }
  .is-on .iflow--rev .iflow__wire--out { --i: 1; }
  .is-on .iflow--rev .iflow__col--out .iflow__tile:nth-child(1) { --i: 2; }
  .is-on .iflow--rev .iflow__col--out .iflow__tile:nth-child(2) { --i: 3; }
  /* 1단계(데이터 등록): 왼쪽 조각 → 선 → 가운데 */
  .is-on .iflow:not(.iflow--3, .iflow--rev) .iflow__node { --i: 3; }
}
@keyframes ifox-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ifox-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ifox-pop { from { opacity: 0; transform: translateX(-8px); } }
@keyframes ifox-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ifox-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes ifox-fade { from { opacity: 0; } }

@media (max-width: 560px) {
  .ifox { justify-content: flex-start; gap: var(--sp-1); }
  .ifox__fox { width: 72px; }
  .ifox .ifox__bubble { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); }
}

/* 이 장은 넓은 화면에서 한 화면 안에 들어오게 위아래 여백을 줄인다(고정 머리 2줄 ≈ 130px 제외) */
@media (min-width: 961px) {
  .bu--sapie-agent #s-tech { padding-block: clamp(32px, 4.5vh, 56px); }
  .bu--sapie-agent #s-tech > .container { padding-block: 0; }
  .bu--sapie-agent #s-tech .section__head { margin-bottom: clamp(28px, 4vh, 44px); }
}

/* `[모바일 2026-11-03]` 홀로 선 글자 링크의 눌리는 칸을 위아래로만 44px 까지 늘린다(자리 · 모양은 그대로) —
   components.css 푸터 링크 · 홈 .hero__layer 와 같은 방식. */
@media (max-width: 860px) {
  .acase__more {
    position: relative;
  }
  .acase__more::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: min(0%, calc((100% - var(--sp-7)) / 2));
    bottom: min(0%, calc((100% - var(--sp-7)) / 2));
  }
}

/* `[모바일 r5 2026-11-04]` 단계 버튼(1 데이터 등록 …) 칸이 35px — 위아래만 44px 로. 글 옆 화살표는 검은 채움 원(20px)이
   사이트 글자 화살표(→, 흐린 색, 글자 크기)와 문법이 달라 모바일에서 글자 화살표로 맞춘다(.onward__links .card__more 와 같은 결). */
@media (max-width: 860px) {
  .isteps__btn {
    position: relative;
  }
  .isteps__btn::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: min(0%, calc((100% - var(--sp-7)) / 2));
    bottom: min(0%, calc((100% - var(--sp-7)) / 2));
  }
  .acase__more {
    gap: 0.35em;
  }
  .acase__more svg {
    display: none;
  }
  .acase__more::before {
    content: "→";
    content: "→" / "";
    order: 1;
    font-weight: 400;
    color: var(--text-faint);
    transition: translate var(--dur-hover) var(--ease);
  }
  .acase__more:is(:hover, :focus-visible)::before {
    translate: 3px 0;
  }
}
