/* 구매사(buyers.html) 전용 — 공공기관 안심 띠 + «견적을 넘어» 네 단계 (2026-10-30).
   다른 화면과 겹치지 않게 모든 규칙은 body.by-page 아래에서만 걸린다.
   색은 랜딩 공용 값 그대로: 보라 #7938d6 · 연보라 #f1e9fd/#f6f2fd/#f8f6fc · 글자 #191f28/#4e5968/#6b7684/#8b95a1 · 선 #e5e8eb */

/* 히어로 그리드 안: 안심 띠·네 단계는 두 칸을 다 쓰고, 큰 화면 그림보다 먼저 나온다. */
.by-page .page-content .by-intro { margin-top: 56px; }
.by-page.sp-flow .page-content .subpage-hero.sp-hero > .by-intro { grid-column: 1 / -1; }
.by-page.sp-flow .sp-hero > .by-intro + .sp-visual { margin-top: 104px; }

/* ---- 안심 띠: 공공기관 담당자용 인증 4개 ---------------------------------- */
.by-page .page-content .by-trust {
  padding: 28px; border-radius: 24px;
  background: radial-gradient(90% 140% at 100% 0%, #efe6fc 0%, transparent 58%), linear-gradient(160deg, #faf8fe 0%, #f6f2fd 100%);
}
.by-page .page-content .by-trust__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 20px; }
.by-page .page-content .by-trust__title { margin: 0; max-width: none; font-size: 18px; line-height: 1.5; font-weight: 600; letter-spacing: -.03em; color: #191f28; }
.by-page .page-content .by-trust__note { margin: 0; max-width: none; font-size: 15px; line-height: 1.6; font-weight: 400; color: #6b7684; }
.by-page .page-content .by-trust__list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  max-width: none; margin: 0; padding: 0; list-style: none;
}
.by-page .page-content .by-trust__list > li {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px; border-radius: 16px;
  background: #fff; box-shadow: 0 0 0 1px rgba(121, 56, 214, .08), 0 8px 24px rgba(73, 38, 140, .05);
}
.by-page .by-trust__list svg { flex: none; width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: #f1e9fd; color: #7938d6; }
.by-page .page-content .by-badge__name { display: block; font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: -.03em; color: #191f28; }
.by-page .by-nowrap { white-space: nowrap; }
.by-page .page-content .by-badge__note { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; font-weight: 400; color: #6b7684; }

/* ---- «견적을 넘어» 네 단계 ------------------------------------------------- */
.by-page .page-content .by-value { margin-top: 112px; }
.by-page .page-content .by-value__eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 4px 12px; max-width: none; border-radius: 8px;
  background: #f1e9fd; color: #7938d6; font-size: 14px; line-height: 1.6; font-weight: 600; letter-spacing: -.02em;
}
.by-page .page-content .by-value .by-value__title { margin: 0 0 16px; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.38; letter-spacing: -.04em; font-weight: 600; color: #191f28; }
.by-page .page-content .by-value .by-value__lead { margin: 0; max-width: 640px; font-size: 18px; line-height: 1.75; color: #6b7684; font-weight: 300; }

.by-page .page-content .by-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  max-width: none; margin: 48px 0 0; padding: 0; list-style: none; color: inherit; font-size: inherit;
}
.by-page .page-content .by-steps > li.by-step {
  position: relative; display: flex; flex-direction: column; margin: 0; padding: 28px 26px 26px; border-radius: 24px;
  background: #f8f6fc; font-weight: 400;
}
/* 단계 사이 화살표 — 넷이 한 흐름이라는 표시 */
.by-page .page-content .by-steps > li.by-step + li.by-step::before {
  content: ""; position: absolute; z-index: 1; left: -20px; top: 40px; width: 20px; height: 20px;
  background: center / 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237938d6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E");
}
.by-page .page-content .by-step__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 36px; }
.by-page .page-content .by-step__num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #7938d6; font-size: 14px; font-weight: 600; letter-spacing: 0; }
.by-page .by-step__top svg { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: #fff; color: #7938d6; box-shadow: 0 6px 18px rgba(73, 38, 140, .08); }
.by-page .page-content .by-steps .by-step__tag { display: block; margin: 0 0 6px; max-width: none; font-size: 14px; line-height: 1.5; font-weight: 600; color: #7938d6; letter-spacing: -.02em; }
.by-page .page-content .by-steps .by-step h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.5; letter-spacing: -.04em; font-weight: 600; color: #191f28; }
.by-page .page-content .by-step p { margin: 0; max-width: none; font-size: 15.5px; line-height: 1.7; letter-spacing: -.03em; font-weight: 400; color: #6b7684; }
.by-page .page-content .by-step__outputs { display: flex; flex-wrap: wrap; gap: 6px; max-width: none; margin: auto 0 0; padding: 22px 0 0; list-style: none; font-size: 13px; }
.by-page .page-content .by-step__outputs > li {
  margin: 0; padding: 3px 10px; border-radius: 999px; background: #fff; color: #4e5968;
  font-size: 13px; line-height: 1.6; font-weight: 500; box-shadow: inset 0 0 0 1px #ebe1fc;
}
.by-page .page-content .by-value__note { margin: 20px 0 0; max-width: none; font-size: 14px; line-height: 1.7; font-weight: 400; color: #8b95a1; }

/* 카드가 차례로 떠오르게(copy-motion 의 data-surface 를 그대로 쓰고 지연만 준다) */
.by-page [data-copy-motion] .by-steps > li:nth-child(2)[data-surface].is-revealed { animation-delay: 80ms; }
.by-page [data-copy-motion] .by-steps > li:nth-child(3)[data-surface].is-revealed { animation-delay: 160ms; }
.by-page [data-copy-motion] .by-steps > li:nth-child(4)[data-surface].is-revealed { animation-delay: 240ms; }

/* ---- 태블릿 ---------------------------------------------------------------- */
@media (max-width: 1279px) {
  .by-page .page-content .by-trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .by-page .page-content .by-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 두 줄 배치에서는 3번째 카드가 새 줄 맨 앞이라 화살표를 뺀다 */
  .by-page .page-content .by-steps > li.by-step:nth-child(3)::before { display: none; }
}

@media (max-width: 699px) {
  .by-page .page-content .by-trust__list { grid-template-columns: 1fr; }
}

/* ---- 휴대폰: 한 줄씩, 가로 넘침 없이 ---------------------------------------- */
@media (max-width: 640px) {
  /* 이 화면만: 본문·머리·바닥의 안쪽 여백(64px)을 없애 몸통 여백(24px)만 남긴다 */
  body.by-page { --content-inset: 0px; }
  /* 머리 메뉴가 390px 를 넘어 가로로 밀리던 것 — 로고·시작하기 한 줄, 메뉴는 아래 줄 */
  body.by-page > header {
    grid-template-columns: auto auto; grid-template-areas: "logo account" "nav nav";
    row-gap: 6px; column-gap: 12px; min-height: 0; padding: 12px 0 8px;
  }
  body.by-page > header .site-logo { grid-area: logo; }
  body.by-page > header nav[aria-label="계정 메뉴"] { grid-area: account; gap: 12px; font-size: 15px; }
  body.by-page > header nav[aria-label="계정 메뉴"] a.header-cta { padding: 8px 14px; }
  body.by-page > header nav[aria-label="주요 메뉴"] {
    grid-area: nav; justify-self: stretch; min-width: 0; gap: 18px; overflow-x: auto; font-size: 15px;
    scrollbar-width: none; padding-block: 4px;
  }
  body.by-page > header nav[aria-label="주요 메뉴"]::-webkit-scrollbar { display: none; }

  .by-page.sp-flow .page-content .subpage-hero.sp-hero { padding-top: 72px; }
  .by-page.sp-flow .page-content .sp-eyebrow { margin-bottom: 12px; font-size: 16px; }
  .by-page.sp-flow .page-content .subpage-hero > p.sp-hero-lead { font-size: 17px; }
  .by-page .page-content .by-intro { margin-top: 40px; }

  .by-page .page-content .by-trust { padding: 22px 18px 18px; border-radius: 20px; }
  .by-page .page-content .by-trust__head { margin-bottom: 16px; }
  .by-page .page-content .by-trust__title { font-size: 17px; }
  .by-page .page-content .by-trust__note { font-size: 14px; }
  .by-page .page-content .by-trust__list { gap: 8px; }
  .by-page .page-content .by-trust__list > li { gap: 12px; padding: 12px 14px; border-radius: 14px; }
  .by-page .by-trust__list svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; }
  .by-page .page-content .by-badge__name { font-size: 15px; }
  .by-page .page-content .by-badge__note { font-size: 12.5px; }

  .by-page .page-content .by-value { margin-top: 72px; }
  .by-page .page-content .by-value .by-value__lead { font-size: 16px; }
  .by-page .page-content .by-steps { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
  .by-page .page-content .by-steps > li.by-step { padding: 24px 22px 22px; border-radius: 20px; }
  /* 한 줄 배치: 화살표는 카드 사이 위→아래 */
  .by-page .page-content .by-steps > li.by-step + li.by-step::before,
  .by-page .page-content .by-steps > li.by-step:nth-child(3)::before {
    display: block; left: 50%; top: -22px; width: 20px; height: 20px; transform: translateX(-50%) rotate(90deg);
  }
  .by-page .page-content .by-step__top { margin-bottom: 20px; }
  .by-page .by-step__top svg { width: 40px; height: 40px; padding: 9px; }
  .by-page .page-content .by-steps .by-step h3 { font-size: 19px; }
  .by-page .page-content .by-step p { font-size: 15px; }
  .by-page .page-content .by-step__outputs { padding-top: 16px; }
  .by-page.sp-flow .sp-hero > .by-intro + .sp-visual { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .by-page [data-copy-motion] .by-steps > li[data-surface].is-revealed { animation-delay: 0ms; }
}
