/* ------------------------------------------------------------------
   웹 배포본 전용 스타일 (사이트 껍데기 + 광고 자리 + 안내 페이지)
   오프라인 배포본(아이폰/윈도우용 단일 파일)에는 들어가지 않는다.

   ★ 인쇄 규칙: 이 파일이 만드는 요소는 시험지에 절대 찍히면 안 된다.
      맨 아래 @media print 블록에서 전부 강제로 숨긴다. 지우지 말 것.
   ------------------------------------------------------------------ */

/* --- 상단 내비게이션 --- */
.site-nav {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  margin: -24px -24px 24px;
  padding: 0 24px;
}

.site-nav-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 52px;
  flex-wrap: wrap;
}

.site-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 14px;
}

.site-nav a:hover {
  color: #2563eb;
}

.site-nav a.brand {
  font-weight: 700;
  color: #1f2937;
  font-size: 15px;
  margin-right: auto;
}

/* --- 광고 자리 --- */
/*
  높이를 미리 잡아두는 이유: 광고가 늦게 도착해도 화면이 아래로 밀리지 않게
  하기 위함이다. 자리만 잡고 배경은 투명하게 둬서, 광고가 없을 때는
  그냥 빈 여백처럼 보인다.
*/
.ad-zone {
  max-width: 720px;
  margin: 0 auto 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* 실제 높이값은 build.py가 광고단위 크기에 맞춰 인라인 style로 넣어 준다 */
  min-height: var(--ad-h-pc, 0px);
}

/* 광고단위 ID가 아직 없으면 build.py가 자리 자체를 만들지 않는다.
   개발 중 확인용 회색 상자는 .ad-zone.is-placeholder 로 표시된다. */
.ad-zone.is-placeholder {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12px;
  background: #fff;
}

/* --- 하단 푸터 --- */
.site-footer {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 20px 0 40px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.8;
}

.site-footer a {
  color: #475569;
  margin-right: 14px;
}

.site-footer p {
  margin: 8px 0 0;
}

/* --- 안내 페이지(가이드 · 인쇄 팁 · 개인정보처리방침) --- */
.article {
  max-width: 720px;
  margin: 0 auto 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 28px 32px;
  line-height: 1.8;
  font-size: 15px;
  color: #1f2937;
}

.article h1 {
  font-size: 24px;
  margin: 0 0 6px;
}

.article .lead {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 28px;
}

.article h2 {
  font-size: 18px;
  margin: 34px 0 12px;
  padding-top: 4px;
  border-top: 1px solid #eef2f7;
}

.article h2:first-of-type {
  border-top: none;
  margin-top: 24px;
}

.article h3 {
  font-size: 15px;
  margin: 22px 0 8px;
}

.article p,
.article li {
  font-size: 15px;
}

.article ul,
.article ol {
  padding-left: 22px;
}

.article li {
  margin-bottom: 8px;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}

.article th,
.article td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.article th {
  background: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
}

.article code {
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
}

.article .callout {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
}

.article .callout.warn {
  background: #fffbeb;
  border-left-color: #d97706;
}

.article .cta {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 15px;
  margin-top: 8px;
}

/* --- 첫 화면 소개 문구 --- */
.tagline {
  max-width: 720px;
  margin: -12px auto 20px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .ad-zone {
    min-height: var(--ad-h-mobile, 0px);
  }
  .site-nav {
    margin: -12px -12px 16px;
    padding: 0 12px;
  }
  .site-nav-inner {
    height: auto;
    padding: 10px 0;
    gap: 12px;
  }
  .site-nav a.brand {
    width: 100%;
    margin-right: 0;
  }
  .article {
    padding: 20px 16px;
  }
  .article h1 {
    font-size: 20px;
  }
  .article table {
    display: block;
    overflow-x: auto;
  }
}

/* ------------------------------------------------------------------
   ★★★ 인쇄 시 사이트 껍데기는 전부 제거 ★★★
   광고·내비·푸터가 한 줄이라도 남으면 시험지가 2페이지로 넘어간다.
   .no-print 클래스와 별개로 여기서 한 번 더 확실히 막는다.
   ------------------------------------------------------------------ */
@media print {
  .site-nav,
  .ad-zone,
  .site-footer,
  .tagline,
  .article {
    display: none !important;
  }
}
