/* 사용 설명서 페이지. 기본 문서 스타일(policy.css) 위에 얹는다. */

.guide h2 {
  margin: 44px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 20px;
}
.guide h2:first-of-type { border-top: 0; padding-top: 0; }
.guide h2 small { font-size: 15px; font-weight: 600; color: var(--text-3); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 8px; }
.cards .card {
  padding: 18px 20px; border-radius: 14px; background: #f8fafd;
  border: 1px solid var(--line);
}
.cards .card h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 700; color: var(--text); }
.cards .card p { margin: 0; font-size: 14px; line-height: 1.65; }

.steps { counter-reset: step; list-style: none; margin: 14px 0; padding: 0; }
.steps li {
  position: relative; margin: 10px 0; padding-left: 34px;
  color: var(--text-2); line-height: 1.7;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 12.5px; font-weight: 700; display: grid; place-items: center;
}

.tip {
  margin: 14px 0; padding: 12px 16px; border-radius: 10px;
  background: #eff4ff; border-left: 3px solid var(--primary);
  font-size: 14px; line-height: 1.65;
}

.guide code {
  padding: 2px 7px; border-radius: 6px; background: #eef1f5;
  font-size: 13.5px; font-family: inherit; font-weight: 600; color: var(--text);
}

@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .guide h2 { margin-top: 34px; font-size: 18.5px; }
}

/* 종이로 뽑을 때. PDF 로 만들어 나눠 주는 데도 이 규칙을 쓴다.
   한 절이 쪽 경계에서 끊기지 않게 하고, 화면에서만 쓰는 것(돌아가기 링크)은 뺀다. */
@media print {
  @page { size: A4; margin: 15mm 14mm 16mm; }

  .back { display: none; }
  .doc { max-width: none; padding: 0; }

  /* 카드·팁의 옅은 바탕색이 빠지면 글이 다 같아 보인다. 그대로 찍히게 한다.
     글꼴은 화면과 달리 고정 글꼴을 쓴다 — 화면에 쓰는 Pretendard 는 가변 글꼴이라
     PDF 에 글꼴로 심기지 못하고 글자가 도형으로 바뀐다. 그러면 보이기는 해도
     찾기·복사가 안 되고 파일도 몇 배로 커진다. */
  body {
    -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 11pt;
    font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  }

  h1 { font-size: 22pt; }
  .guide h2 { font-size: 14pt; margin-top: 22px; padding-top: 14px; break-after: avoid; }
  .guide h2:first-of-type { margin-top: 0; }
  .cards .card h3 { break-after: avoid; }

  /* 쪽 경계에서 토막 나면 읽기 나쁘다 */
  .cards .card, .tip, .steps li, tr { break-inside: avoid; }
  table { break-inside: auto; }

  /* 종이에서는 링크 주소를 알 길이 없으므로 옆에 적어 준다 (내부 앵커는 빼고) */
  .guide a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #6b7280; }
}
