/* business/ebook/salespage/public/styles.css */

:root {
  --ink: #0E0F12;
  --gold: #FFDA00;
  --paper: #FFFFFF;
  --muted: #6B6F76;
  --line: #E5E6E8;
  --line-dark: #2A2C31;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  word-break: keep-all;      /* 한글 줄바꿈이 단어 중간에서 끊기지 않게 */
  padding-bottom: 80px;      /* 플로팅 바에 본문 마지막 줄이 가리지 않게 */
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* 블록의 직계 자식은 640px 칸에 가운데 정렬된다.
 *
 * ⚠️ 이 규칙의 특정도는 (0,1,0)이라 약하다. 직계 자식에 붙는 규칙이 `margin` 축약형을
 * 쓰면 margin-inline까지 덮어써서 가운데 정렬이 조용히 풀린다 — 화면이 좁으면
 * max-width가 안 걸려 티도 안 난다(모바일에서 못 보고 지나쳤다, 2026-08-07).
 * 직계 자식의 세로 여백을 손볼 때는 반드시 `margin-block`을 쓸 것. */
.block { padding: 64px 20px; }
.block > * { max-width: 640px; margin-inline: auto; }
.block > * + * { margin-top: 20px; }

.block[data-theme="dark"] { background: var(--ink); color: #F2F3F5; }
.block[data-theme="dark"] strong,
.block[data-theme="dark"] .accent { color: var(--gold); }
/* 버튼은 제 색을 갖는다. :not()이 없으면 이 규칙이 .btn-buy의 글자색을 이겨서
   (특정도 0,2,1 대 0,1,0) 금색 배경 위에 금색 글자가 된다 — 완료 화면의
   '책 내려받기'가 실제로 그렇게 안 보였다(2026-08-07). 판매 페이지의 구매 버튼은
   <button>이라 걸리지 않아 완료 화면에서만 터졌다. */
.block[data-theme="dark"] a:not(.btn-buy) { color: var(--gold); }
.block[data-theme="dark"] .note { color: #B9BBC0; }
.block[data-theme="dark"] table { border-color: var(--line-dark); }
.block[data-theme="dark"] th,
.block[data-theme="dark"] td { border-color: var(--line-dark); }

.block[data-theme="light"] { background: var(--paper); color: var(--ink); }
.block[data-theme="light"] a:not(.btn-buy) { color: var(--ink); }
.block[data-theme="light"] .note { color: var(--muted); }

h1, h2, h3 { line-height: 1.4; margin: 0; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
.block > h2 + * ,
.block > h1 + * { margin-top: 16px; }

a { text-decoration: underline; text-underline-offset: 2px; }

ul.list { margin-block: 0; padding-left: 1.2em; }
ul.list li { margin: 0 0 12px; }
ul.list li:last-child { margin-bottom: 0; }

.note { font-size: 14.5px; line-height: 1.7; }

/* ---------- 표 ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
caption { text-align: left; font-weight: 700; margin-bottom: 8px; }
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-weight: 700; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* ---------- 히어로 ---------- */
#hero .hook { margin-block: 0 24px; padding: 0; border: 0; font-size: 18px; }
#hero .hook p { margin: 0 0 12px; }
#hero .hook p:last-child { margin-bottom: 0; }
#hero .cover {
  max-width: 220px;
  margin: 24px auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  border-radius: 4px;
}
#hero h1 { margin-top: 28px; }
#hero .subtitle { font-size: 19px; font-weight: 700; color: var(--gold); margin-top: 10px; }
#hero .tagline { font-size: 15px; color: #C7C9CE; margin-top: 8px; }

.price-block { margin-top: 28px; }
.price { font-size: 28px; font-weight: 800; }
.price .price-was { font-weight: 400; font-size: 17px; color: #9A9DA4; margin-right: 8px; }
.price .price-was s { text-decoration: line-through; }
.block[data-theme="light"] .price .price-was { color: var(--muted); }
.deadline { font-size: 14.5px; margin-top: 8px; color: #C7C9CE; }
.block[data-theme="light"] .deadline { color: var(--muted); }

#hero .btn-buy { margin-top: 24px; }

/* ---------- 정직 카드 / FAQ / 숫자 블록 공통 h3+p 리듬 ---------- */
.stack > h3 { margin-top: 28px; }
.stack > h3:first-child { margin-top: 0; }
.stack > h3 + p { margin-top: 10px; }

figure.diagram { margin-block: 16px 0; }
figure.diagram figcaption {
  font-size: 13.5px; color: var(--muted); margin-top: 8px; text-align: center;
}

/* ---------- 인용 ---------- */
blockquote.callout {
  margin-block: 0;
  padding: 20px;
  border-left: 3px solid var(--gold);
  background: rgba(255, 218, 0, .06);
  border-radius: 4px;
}
blockquote.callout p { margin: 0 0 10px; }
blockquote.callout p:last-child { margin-bottom: 0; }

/* ---------- 인라인 CTA ---------- */
.cta-inline { padding: 40px 20px; background: var(--paper); text-align: center; }

/* ---------- 구매 폼 ---------- */
#purchase h2 { text-align: center; }
#purchase .price,
#purchase .deadline { text-align: center; }

#buy-form { margin-top: 32px; display: grid; gap: 16px; }
#buy-form label { display: block; font-size: 15px; }
#buy-form label:not(.check) input[type="email"] {
  display: block; width: 100%; margin-top: 6px;
  padding: 14px; border-radius: 8px; border: 1px solid #3A3C42;
  background: #16171B; color: #F2F3F5; font: inherit; font-size: 16px;
}
#buy-form label:not(.check) input[type="email"]:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
#buy-form label.check {
  display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.6;
}
#buy-form label.check input { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; }
#buy-form .btn-buy { margin-top: 8px; }
.form-error, .config-error {
  font-size: 14.5px; color: #FF8A8A; text-align: center; margin: 0;
}
.config-error button {
  background: none; border: 0; color: var(--gold); text-decoration: underline;
  font: inherit; cursor: pointer; padding: 0;
}
#purchase .note { text-align: center; margin-top: 24px; }

/* 총액표시 — 화면의 숫자가 곧 결제 금액임을 못 박는다. 숫자 자체는 여기 없고
   app.js가 /api/config로 그린다. */
.vat { font-size: 13.5px; margin-top: 6px; text-align: center; opacity: 0.75; }

/* ---------- 결제 전 미리보기 ----------
   법 제17조 제6항이 요구하는 조치라 눈에 띄어야 한다. 다만 구매 CTA는 아니므로
   버튼이 아닌 강조된 링크로 둔다(Lite 출구와 같은 논리, 위계만 한 단계 위). */
.preview { margin-top: 22px; }
.preview a { font-size: 16px; font-weight: 700; }
.preview + .note { margin-top: 8px; }

/* ---------- Lite 출구 ---------- */
#lite-exit { text-align: center; padding: 40px 20px; }
#lite-exit .exit-link { font-size: 16px; font-weight: 700; }
#lite-exit p { margin-top: 10px; font-size: 14.5px; color: var(--muted); }

/* ---------- 결제 완료 화면 ---------- */
#done > * + *,
#failed > * + * { margin-top: 20px; }
#done > h1 + *,
#done > h2 + *,
#failed > h1 + * { margin-top: 16px; }

/* ---------- 푸터 ---------- */
#footer { font-size: 13px; color: var(--muted); padding-top: 32px; padding-bottom: 48px; }
#footer .legal-links { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; }
#footer .legal-info { line-height: 1.8; text-align: center; }
#footer .legal-info,
#footer .legal-links,
#footer .copyright { text-align: center; }
#footer .copyright { margin-top: 4px; }

/* ---------- 버튼 ----------
   이 클래스는 <button>과 <a> 양쪽에 붙는다(판매 페이지는 버튼, 완료 화면의
   내려받기는 링크). 그래서 브라우저가 <button>에만 기본으로 주는 것들을
   여기서 직접 적어야 한다 — 가운데 정렬과 밑줄 없음이 그것이다.
   빠뜨렸더니 완료 화면 버튼만 글자가 왼쪽으로 쏠리고 밑줄이 그어졌다(2026-08-07). */
.btn-buy {
  display: block; width: 100%; max-width: 420px; margin-inline: auto;
  background: var(--gold); color: var(--ink); border: 0; border-radius: 8px;
  font: inherit; font-weight: 700; font-size: 18px; padding: 16px 24px; cursor: pointer;
  text-align: center; text-decoration: none;
}
.btn-buy:disabled { opacity: .5; cursor: progress; }

.floating-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 12px; align-items: center; justify-content: center;
  padding: 10px 16px; background: rgba(14, 15, 18, .96); color: #F2F3F5;
  border-top: 1px solid var(--line-dark);
}
.floating-cta span { font-weight: 700; font-size: 15px; white-space: nowrap; }
.floating-cta .btn-buy { width: auto; margin: 0; padding: 10px 20px; font-size: 16px; }
.floating-cta[hidden] { display: none; }

@media (min-width: 720px) {
  .block { padding: 88px 24px; }
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
}
