/* 발행물 읽기 화면.
   위컴어스 전자책 CSS 를 가져와 디지털한글 토큰으로 맞췄다.
   색을 직접 적지 않고 tokens.css 의 역할 이름을 쓴다. */
@charset "utf-8";
/* 인터랙티브 전자책 — 사장님을 위한 AI 실전 안내서 */


/* ══════════ 전자책 뷰어 ══════════ */
/* ── 위컴어스에만 있던 변수를 우리 토큰으로 이어 준다 ──
   ★ 정의되지 않은 변수를 쓰면 그 규칙이 통째로 무시된다.
     --fs 는 글자 크기 조절(가-·가·가+)에 쓰이므로 반드시 살린다. */
.eb {
  --fs: 16.5px;                       /* 본문 크기. 도구가 이 값을 바꾼다 */
  --nav-h: 0px;                       /* 우리 머리말은 sticky 가 아니다 */
  --panel-line: var(--dh-line);
  --text: var(--dh-ink);
  --sub: var(--dh-ink-sub);
  --bg-2: var(--dh-bg-soft);
}
.eb[data-fontstep="0"] { --fs: 15px; }
.eb[data-fontstep="2"] { --fs: 18.5px; }
.eb[data-fontstep="3"] { --fs: 20.5px; }

.eb { display: grid; grid-template-columns: 320px 1fr; min-height: 100vh; --fs: 17px; --nav-h: 68px; }

/* ── 좌측 사이드바 ── (사이트 상단 고정 nav 아래로 내려서 잘림 방지) */
.eb-side { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--panel-line); padding: 30px 24px; display: flex; flex-direction: column; }
.eb-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--dh-accent-sub); margin-bottom: 12px; }
.eb-title { font-size: 22px; font-weight: 900; letter-spacing: -.02em; line-height: 1.3; margin-bottom: 8px; }
.eb-sub { font-size: 13px; color: var(--sub); line-height: 1.6; margin-bottom: 18px; }
.eb-progress { height: 6px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.eb-progress-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--dh-accent), var(--dh-accent-deep)); border-radius: 999px; transition: width .3s; }
.eb-progress-label { font-size: 12px; color: var(--sub); margin-bottom: 24px; }
.eb-progress-label b { color: var(--dh-accent-sub); }

.eb-toc { flex: 1; }
.eb-part { font-size: 12.5px; font-weight: 800; color: var(--dh-accent-sub); margin: 20px 0 8px; letter-spacing: -.01em; }
.eb-part:first-child { margin-top: 0; }
.eb-tocitem { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; color: var(--sub); text-decoration: none; line-height: 1.45; transition: all .15s; }
.eb-tocitem:hover { background: rgba(255,255,255,.04); color: var(--text); }
.eb-tocitem.active { background: rgba(31,58,95,.14); color: var(--dh-ink); font-weight: 600; }
.eb-check { flex-shrink: 0; width: 15px; height: 15px; border: 1.5px solid var(--panel-line); border-radius: 5px; margin-top: 2px; transition: all .2s; }
.eb-check.done { background: linear-gradient(120deg,var(--dh-accent),var(--dh-accent-deep)); border-color: transparent; position: relative; }
.eb-check.done::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--dh-ink); font-weight: 900; }

.eb-side-cta { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--panel-line); display: flex; flex-direction: column; gap: 8px; }
.eb-side-cta a { font-size: 13px; font-weight: 700; padding: 10px 14px; border-radius: 10px; text-align: center; text-decoration: none; transition: all .2s; }
.eb-side-cta a:first-child { background: rgba(31,58,95,.12); color: var(--dh-accent-sub); border: 1px solid rgba(47,92,150,.28); }
.eb-side-cta a:last-child { background: var(--dh-accent-deep); color: var(--dh-accent-ink); }
.eb-side-cta a:hover { filter: brightness(1.1); }

/* ── 우측 본문 ── */
.eb-main { min-width: 0; }
.eb-topbar { position: sticky; top: var(--nav-h); z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 14px 30px; background: var(--dh-bg-card); backdrop-filter: blur(10px); border-bottom: 1px solid var(--panel-line); }
.eb-menu-btn { display: none; background: none; border: 1px solid var(--panel-line); color: var(--text); font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.eb-tools { display: flex; gap: 6px; margin-left: auto; }
.eb-font-btn { background: rgba(255,255,255,.04); border: 1px solid var(--panel-line); color: var(--sub); font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.eb-font-btn:hover { color: var(--text); border-color: var(--dh-accent-sub); }

.eb-content { max-width: 760px; margin: 0 auto; padding: 44px 30px 80px; }

.eb-hero { margin-bottom: 56px; padding-bottom: 40px; border-bottom: 1px solid var(--panel-line); }
.eb-hero-kicker { font-size: 12.5px; font-weight: 800; color: var(--dh-accent-sub); letter-spacing: .04em; margin-bottom: 16px; }
.eb-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 900; letter-spacing: -.03em; line-height: 1.2; margin-bottom: 14px; }
.eb-hero-sub { font-size: 18px; color: var(--dh-ink-sub); font-weight: 600; margin-bottom: 22px; }
.eb-hero-lead { font-size: 16px; color: var(--sub); line-height: 1.85; }
.eb-hero-lead strong { color: var(--dh-ink); }

.eb-partsec { margin-bottom: 20px; }
.eb-partlabel { font-size: 15px; font-weight: 800; color: var(--dh-accent-sub); margin: 48px 0 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--panel-line); }

.eb-chapter { padding: 34px 0; border-bottom: 1px solid rgba(255,255,255,.05); scroll-margin-top: calc(var(--nav-h) + 60px); }
.eb-chnum { font-size: 12px; font-weight: 800; color: var(--dh-ink-faint); letter-spacing: .05em; margin-bottom: 8px; }
.eb-chtitle { font-size: clamp(22px, 3.4vw, 30px); font-weight: 900; letter-spacing: -.02em; line-height: 1.3; margin-bottom: 22px; }
.eb-chbody { font-size: var(--fs); line-height: 1.95; color: var(--dh-ink-sub); }
.eb-chbody p { margin-bottom: 20px; }
.eb-chbody strong { color: var(--dh-ink); font-weight: 700; }
.eb-chbody a { color: var(--dh-accent-sub); text-decoration: underline; text-underline-offset: 3px; }
/* 핵심 문장 하이라이트 (형광펜) */
.eb-chbody p.hl { font-size: calc(var(--fs) + 3px); font-weight: 700; color: var(--dh-ink); background: linear-gradient(120deg, rgba(31,58,95,.18), rgba(47,92,150,.12)); border-left: 3px solid var(--dh-accent); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 26px 0; line-height: 1.6; }
.eb-chbody .hl-inline { background: linear-gradient(transparent 55%, rgba(47,92,150,.35) 55%); font-weight: 700; color: var(--dh-ink); padding: 0 2px; }

.eb-keys { margin: 24px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eb-keys-label { font-size: 12px; color: var(--dh-ink-faint); font-weight: 700; }
.eb-keys em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--dh-accent-sub); background: rgba(31,58,95,.12); border: 1px solid rgba(47,92,150,.25); padding: 4px 11px; border-radius: 999px; }

/* 비교표 */
.eb-chbody .tbl-wrap { overflow-x: auto; margin: 26px 0; }
.eb-chbody table { width: 100%; border-collapse: collapse; font-size: calc(var(--fs) - 1.5px); min-width: 440px; }
.eb-chbody thead th { text-align: left; font-weight: 800; color: var(--dh-accent-sub); background: rgba(31,58,95,.1); padding: 12px 14px; border-bottom: 1px solid rgba(47,92,150,.25); }
.eb-chbody tbody td { padding: 11px 14px; border-bottom: 1px solid var(--panel-line); color: var(--dh-line); line-height: 1.6; }
.eb-chbody tbody tr:last-child td { border-bottom: 0; }
.eb-chbody tbody td:first-child { font-weight: 700; color: var(--dh-ink); }
.eb-chbody .tbl-cap { font-size: 12px; color: var(--dh-ink-faint); margin-top: 8px; }
/* 💡핵심 / ⚠️주의 / 🙋알고계셨나요 박스 */
.eb-chbody .box { margin: 26px 0; padding: 18px 22px; border-radius: 0 14px 14px 0; line-height: 1.75; }
.eb-chbody .box-key { background: linear-gradient(120deg,rgba(31,58,95,.14),rgba(47,92,150,.07)); border-left: 3px solid var(--dh-accent); }
.eb-chbody .box-warn { background: rgba(255,180,90,.08); border-left: 3px solid var(--dh-error); }
.eb-chbody .box-did { background: rgba(255,255,255,.03); border-left: 3px solid var(--dh-ink-faint); }
.eb-chbody .box b { color: var(--dh-ink); }
.eb-chbody .box .eb-ref { color: var(--dh-ink-faint); font-weight: 600; font-size: calc(var(--fs) - 3px); }
/* 본문 리스트 */
.eb-chbody ul.eb-list { list-style: none; padding: 0; margin: 20px 0; }
.eb-chbody ul.eb-list li { position: relative; padding-left: 22px; margin-bottom: 11px; line-height: 1.8; color: var(--dh-line); }
.eb-chbody ul.eb-list li::before { content: '▸'; position: absolute; left: 0; color: var(--dh-accent-sub); }
/* 체크리스트 */
.eb-chbody .checklist { margin: 26px 0; padding: 20px 24px; background: rgba(255,255,255,.025); border: 1px solid var(--panel-line); border-radius: 14px; }
.eb-chbody .checklist-title { font-weight: 800; color: var(--text); margin-bottom: 12px; font-size: calc(var(--fs) - 1px); }
.eb-chbody .checklist ul { list-style: none; padding: 0; margin: 0; }
.eb-chbody .checklist li { position: relative; padding-left: 28px; margin-bottom: 10px; font-size: calc(var(--fs) - 1px); color: var(--dh-line); }
.eb-chbody .checklist li::before { content: '☐'; position: absolute; left: 0; color: var(--dh-accent-sub); font-size: 16px; }
/* 인용 질문(독자에게 묻기) */
.eb-chbody .eb-ask { font-style: italic; color: var(--dh-ink-sub); border-top: 1px solid var(--panel-line); border-bottom: 1px solid var(--panel-line); padding: 16px 0; margin: 26px 0; }

/* ── GPT-PARK식 확장 컴포넌트 (2권 공용) ── */
/* 집필 노트 (Thought Process) */
.eb-note { margin: 0 0 30px; padding: 16px 20px; background: rgba(255,255,255,.022); border: 1px dashed var(--panel-line); border-radius: 12px; }
.eb-note-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--dh-accent-sub); margin-bottom: 8px; }
.eb-note p { font-size: calc(var(--fs) - 2px); color: var(--dh-ink-sub); line-height: 1.75; margin: 0; }
/* 수치 카드 (임팩트 데이터) */
.eb-chbody .eb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin: 28px 0; }
.eb-chbody .eb-stat { padding: 20px; background: linear-gradient(150deg,rgba(31,58,95,.1),rgba(47,92,150,.04)); border: 1px solid rgba(47,92,150,.2); border-radius: 16px; text-align: center; }
.eb-chbody .eb-stat b { display: block; font-size: clamp(28px,5vw,40px); font-weight: 900; letter-spacing: -.03em; color: var(--dh-ink); line-height: 1.1; background: linear-gradient(120deg,var(--dh-accent),var(--dh-accent-sub)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.eb-chbody .eb-stat span { display: block; font-size: 12.5px; color: var(--sub); margin-top: 8px; line-height: 1.5; font-weight: 600; }
/* 실전 팁 박스 (💡 이중구조) */
.eb-chbody .eb-tip { margin: 30px 0; padding: 22px 24px; background: rgba(255,255,255,.025); border: 1px solid rgba(47,92,150,.18); border-radius: 16px; }
.eb-chbody .eb-tip-head { font-size: calc(var(--fs) + 1px); font-weight: 800; color: var(--dh-accent-sub); margin-bottom: 6px; }
.eb-chbody .eb-tip-desc { font-size: calc(var(--fs) - 2px); color: var(--sub); margin-bottom: 16px; line-height: 1.7; }
.eb-chbody .eb-tip-item { margin: 14px 0; padding-left: 14px; border-left: 2px solid rgba(47,92,150,.35); }
.eb-chbody .eb-tip-item strong { display: block; color: var(--dh-ink); margin-bottom: 4px; font-size: calc(var(--fs) - .5px); }
.eb-chbody .eb-tip-item p { font-size: calc(var(--fs) - 2px); color: var(--dh-ink-sub); line-height: 1.7; margin: 4px 0; }
/* 용어집 카드 */
.eb-glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px; margin: 8px 0; }
.eb-term { padding: 20px; background: rgba(255,255,255,.025); border: 1px solid var(--panel-line); border-radius: 14px; }
.eb-term-abbr { font-size: 17px; font-weight: 900; color: var(--dh-accent-sub); letter-spacing: -.01em; }
.eb-term-full { font-size: 12px; color: var(--dh-ink-faint); font-weight: 600; margin: 2px 0 10px; }
.eb-term p { font-size: 13.5px; color: var(--dh-ink-sub); line-height: 1.7; margin: 0; }

/* 마무리 섹션 */
.eb-wrap { margin-top: 40px; padding-top: 30px; border-top: 2px solid var(--panel-line); }
.eb-wrap h4 { font-size: calc(var(--fs) + 2px); font-weight: 800; color: var(--dh-accent-sub); margin: 24px 0 12px; }
.eb-wrap h4:first-child { margin-top: 0; }
.eb-wrap ul { list-style: none; padding: 0; margin: 0 0 8px; }
.eb-wrap ul li { position: relative; padding-left: 20px; margin-bottom: 9px; line-height: 1.7; }
.eb-wrap ul li::before { content: '—'; position: absolute; left: 0; color: var(--dh-accent-sub); }
.eb-wrap .eb-oneline { font-size: calc(var(--fs) + 2px); font-weight: 700; color: var(--dh-ink); background: linear-gradient(120deg,rgba(31,58,95,.16),rgba(47,92,150,.1)); padding: 14px 18px; border-radius: 12px; margin: 12px 0; line-height: 1.6; }

/* 워크북(클릭 체크) */
.eb-workbook { margin: 30px 0 8px; padding: 22px 24px; background: linear-gradient(150deg,rgba(31,58,95,.09),rgba(47,92,150,.04)); border: 1px solid rgba(47,92,150,.22); border-radius: 16px; }
.eb-wb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.eb-wb-head strong { font-size: 15px; }
.eb-wb-count { font-size: 12.5px; color: var(--dh-accent-sub); font-weight: 800; }
.eb-wb-desc { font-size: 12.5px; color: var(--sub); margin-bottom: 16px; line-height: 1.6; }
.eb-wb-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 10px; cursor: pointer; transition: all .15s; border: 1px solid transparent; }
.eb-wb-item:hover { background: rgba(255,255,255,.03); }
.eb-wb-item.checked { background: rgba(31,58,95,.08); }
.eb-wb-box { flex-shrink: 0; width: 20px; height: 20px; border: 1.5px solid var(--panel-line); border-radius: 6px; margin-top: 1px; transition: all .2s; display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; }
.eb-wb-item.checked .eb-wb-box { background: linear-gradient(120deg,var(--dh-accent),var(--dh-accent-deep)); border-color: transparent; color: var(--dh-ink); }
.eb-wb-text { font-size: 13.5px; line-height: 1.55; }
.eb-wb-text .eb-wb-tag { display: block; font-size: 11px; font-weight: 800; color: var(--dh-accent-sub); margin-bottom: 2px; }
.eb-wb-item.checked .eb-wb-text { color: var(--sub); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.2); }

.eb-done { margin-top: 18px; background: rgba(255,255,255,.03); border: 1px solid var(--panel-line); color: var(--sub); font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 10px; cursor: pointer; transition: all .2s; }
.eb-done:hover { border-color: var(--dh-accent-sub); color: var(--text); }
.eb-done.done { background: linear-gradient(120deg,var(--dh-accent),var(--dh-accent-deep)); border-color: transparent; color: var(--dh-ink); }

.eb-endcta { margin-top: 60px; padding: 40px 34px; text-align: center; background: linear-gradient(150deg, rgba(31,58,95,.14), rgba(47,92,150,.06)); border: 1px solid rgba(47,92,150,.28); border-radius: 20px; }
.eb-endcta h3 { font-size: 24px; font-weight: 900; letter-spacing: -.02em; margin-bottom: 12px; }
.eb-endcta p { font-size: 15px; color: var(--sub); line-height: 1.7; margin-bottom: 24px; }
.eb-endbtns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── 반응형 ── */
@media (max-width: 900px) {
    .eb { grid-template-columns: 1fr; }
    .eb-side { position: fixed; top: var(--nav-h); left: 0; bottom: 0; height: auto; width: 300px; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 60px rgba(0,0,0,.6); }
    .eb.side-open .eb-side { transform: none; }
    .eb-menu-btn { display: inline-block; }
    .eb-side-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
    .eb.side-open .eb-side-backdrop { opacity: 1; pointer-events: auto; }
}

/* ── 장 삽화 ──────────────────────────────────────── */
/*   글이 이어지는 사이에 쉬어 갈 자리를 만든다.
     ★ 글이 본체다. 그림이 글을 밀어내지 않도록 크기를 절제한다. */
.eb-fig {
  margin: 22px 0 26px; border-radius: 12px; overflow: hidden;
  background: #0d1a2b; border: 1px solid var(--dh-line);
}
.eb-fig img { width: 100%; height: auto; display: block; }
