/* 답오더 사용 설명서 묶음의 공용 스타일. 색·글꼴은 답오더 디자인 시스템(틸·네이비·앰버, Pretendard)을 따른다.
   부품: 표지(.cover) · 목차(.toc) · 절(section) · 요약 카드(.summary) · 단계(.steps) · 알림 상자(.callout) · 화면 이름(.ui) ·
   가는 길(.path) · 화면 그림(.shot / .shots) · 표(.table-wrap) · 이럴 때는(.trouble) · 묻고 답하기(.faq) · 점검표(.checklist). */
:root {
  --dap-navy: #1b2a4a;
  --dap-navy-2: #3b4a66;
  --dap-teal: #0d9488;
  --dap-teal-dark: #0f766e;
  --dap-teal-light: #ccfbf1;
  --dap-teal-tint: #f0fdfa;
  --dap-amber: #d97706;
  --dap-amber-dark: #b45309;
  --dap-amber-light: #fef3c7;
  --dap-surface: #fafaf9;
  --dap-white: #ffffff;
  --dap-muted: #78716c;
  --dap-border: #e7e5e4;
  --dap-border-strong: #d6d3d1;
  --dap-success: #059669;
  --dap-error: #dc2626;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(27, 42, 74, .05), 0 8px 24px rgba(27, 42, 74, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--dap-surface);
  color: var(--dap-navy);
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }
li { margin: 4px 0; }
strong { font-weight: 700; }
a { color: var(--dap-teal-dark); }
section[id], h3[id] { scroll-margin-top: 16px; }

/* ── 설명서 사이를 오가는 띠 ───────────────────────── */
.guide-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  padding: 10px 32px; background: var(--dap-white); border-bottom: 1px solid var(--dap-border);
  font-size: 13px; color: var(--dap-muted);
}
.guide-bar a { color: var(--dap-navy-2); text-decoration: none; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.guide-bar a:hover { background: var(--dap-surface); }
.guide-bar a.current { background: var(--dap-teal-light); color: var(--dap-teal-dark); font-weight: 700; }
.guide-bar .home { font-weight: 700; color: var(--dap-navy); padding-left: 0; margin-right: 8px; }

/* ── 표지 ─────────────────────────────────────────── */
.cover {
  background: linear-gradient(135deg, #134e4a 0%, var(--dap-teal-dark) 45%, var(--dap-teal) 100%);
  color: #fff;
  padding: 52px 32px 0;
}
.cover-inner { max-width: 1160px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: #fff; color: var(--dap-teal-dark);
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; letter-spacing: -0.03em;
}
.brand-eyebrow { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; color: #99f6e4; margin-bottom: 1px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.cover h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.cover .lede { margin-top: 12px; font-size: 16px; max-width: 760px; color: #ccfbf1; }
.cover-meta {
  margin: 28px 0 0; display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius-lg); overflow: hidden;
}
.cover-meta div { background: rgba(10, 60, 56, .5); padding: 12px 16px; }
.cover-meta dt { font-size: 12px; letter-spacing: .04em; color: #99f6e4; }
.cover-meta dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; }
/* 표지 아래 기준 한 줄(그림은 견본이라는 알림 포함) */
.basis { margin: 40px -32px 0; padding: 16px 32px 0; background: var(--dap-surface); color: var(--dap-muted); font-size: 13px; }
.basis span { display: block; max-width: 1160px; margin: 0 auto; }

/* ── 레이아웃 ─────────────────────────────────────── */
.layout {
  max-width: 1240px; margin: 0 auto; padding: 0 32px 72px;
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px;
  align-items: start;
}
.toc { position: sticky; top: 20px; margin-top: 32px; max-height: calc(100vh - 40px); overflow-y: auto; }
.toc h4 { font-size: 12px; letter-spacing: .08em; color: var(--dap-muted); margin-bottom: 10px; }
.toc a {
  display: block; padding: 5px 10px; border-radius: var(--radius-md);
  color: var(--dap-navy-2); text-decoration: none; font-size: 13.5px;
  border-left: 2px solid transparent;
}
.toc a.sub { padding-left: 22px; font-size: 12.5px; color: var(--dap-muted); }
.toc a:hover { background: var(--dap-white); color: var(--dap-teal-dark); border-left-color: var(--dap-teal); }
.toc-mobile { display: none; }
/* 목차 없는 쪽(묶음 첫 화면) */
.layout.single { grid-template-columns: minmax(0, 1fr); max-width: 1160px; }

main { min-width: 0; }
section {
  background: var(--dap-white); border: 1px solid var(--dap-border);
  border-radius: var(--radius-lg); padding: 28px 30px;
  margin-top: 32px; box-shadow: var(--shadow);
}
section > h2 {
  font-size: 22px; font-weight: 700; display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 14px; border-bottom: 2px solid var(--dap-teal-light); margin-bottom: 18px;
}
section > h2 .num {
  font-size: 13px; font-weight: 700; color: var(--dap-teal-dark);
  background: var(--dap-teal-light); border-radius: 999px; padding: 3px 10px;
}
h3 { font-size: 18px; font-weight: 700; margin: 34px 0 10px; color: var(--dap-navy); }
section > h2 + h3, section > h2 + p + h3 { margin-top: 6px; }
h4 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; color: var(--dap-navy-2); }

/* ── 요약 카드 ────────────────────────────────────── */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 4px 0 16px; }
.summary .card { border: 1px solid var(--dap-border); border-radius: var(--radius-md); padding: 14px 16px; background: #fcfcfb; }
.summary .k { font-size: 12px; color: var(--dap-muted); font-weight: 600; letter-spacing: .02em; }
.summary .v { font-size: 15px; font-weight: 700; margin-top: 4px; }

/* ── 표 ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 14px 0 6px; border: 1px solid var(--dap-border); border-radius: var(--radius-md); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
thead th {
  background: #f5f5f4; color: var(--dap-navy); text-align: left; font-weight: 700;
  padding: 10px 14px; border-bottom: 1px solid var(--dap-border-strong); white-space: nowrap;
}
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--dap-border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #fcfcfb; }

/* ── 단계 ────────────────────────────────────────── */
.steps { display: grid; gap: 10px; margin: 14px 0 8px; counter-reset: step; padding: 0; list-style: none; }
.step {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px;
  border: 1px solid var(--dap-border); border-radius: var(--radius-md);
  padding: 13px 16px; background: #fcfcfb; margin: 0;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--dap-teal); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.step > div { min-width: 0; }
.step h4 { margin: 2px 0 4px; font-size: 15px; color: var(--dap-navy); }
.step p { margin: 0 0 6px; font-size: 14.5px; color: var(--dap-navy-2); }
.step p:last-child { margin-bottom: 0; }

/* ── 알림 상자 ───────────────────────────────────── */
.callout {
  border-left: 3px solid var(--dap-teal); background: var(--dap-teal-tint);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 13px 16px; margin: 16px 0; font-size: 14.5px;
}
.callout.warn { border-left-color: var(--dap-amber); background: #fffbeb; }
.callout.tip { border-left-color: var(--dap-success); background: #ecfdf5; }
.callout .title { font-weight: 700; display: block; margin-bottom: 4px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; background: var(--dap-teal-light); color: var(--dap-teal-dark);
  vertical-align: middle;
}
.badge.amber { background: var(--dap-amber-light); color: #92400e; }
.badge.gray { background: #f5f5f4; color: var(--dap-navy-2); }

/* 화면에 보이는 이름(메뉴·단추·칸) — 화면 글자 그대로 */
.ui {
  display: inline-block; padding: 0 6px; border: 1px solid var(--dap-border); border-radius: var(--radius-sm);
  background: var(--dap-surface); color: var(--dap-navy); font-weight: 600; font-size: .94em; line-height: 1.55;
}
/* 가는 길(메뉴 › 화면) — 절이나 단계 머리에 한 줄 */
.path { margin: 4px 0 10px; font-size: 13.5px; color: var(--dap-muted); }
.path b { color: var(--dap-navy-2); font-weight: 600; }

/* ── 화면 그림 ───────────────────────────────────── */
/* <figure class="shot"><a class="zoom" href="shots/x/y.webp" target="_blank" rel="noopener"><img src="shots/x/y.webp" alt="…" width="…" height="…" loading="lazy"></a><figcaption>…</figcaption></figure>
   그림 파일은 2배 해상도 — width·height 는 파일 크기의 절반(화면에서 본 크기). 보통 그림은 본문 폭에 맞추고,
   창·부분 화면처럼 좁은 그림(.narrow)은 그 크기대로 가운데에, 휴대폰 화면은 .phone, 여러 장은 .shots 로 나란히. */
.shot { margin: 16px 0 22px; }
.shot img {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--dap-border); border-radius: var(--radius-md); background: var(--dap-white);
  box-shadow: 0 1px 2px rgba(27, 42, 74, .05), 0 6px 18px rgba(27, 42, 74, .07);
}
.shot figcaption { margin-top: 8px; font-size: 13px; color: var(--dap-muted); text-align: center; }
.shot figcaption b { color: var(--dap-navy-2); font-weight: 600; }
.shot:not(.narrow):not(.phone) img { width: 100%; }
.shot.narrow img { margin: 0 auto; }
.shot.phone { max-width: 300px; margin-left: auto; margin-right: auto; }
.shot.phone img { width: 100%; border-radius: 22px; }
.shot a.zoom { display: block; cursor: zoom-in; }
.shots { display: grid; gap: 16px; margin: 16px 0 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; }
.shots .shot { margin: 0; }
.shots .shot.phone { max-width: 280px; }
.shots:not(:has(.phone)) { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.step .shot, .step .shots, .trouble .shot { margin: 12px 0 4px; }

/* 「이럴 때는」 — 증상·확인·조치 */
.trouble { margin: 14px 0; border: 1px solid var(--dap-border); border-radius: var(--radius-md); overflow: hidden; }
.trouble > div { padding: 12px 16px; border-top: 1px solid var(--dap-border); }
.trouble > div:first-child { border-top: 0; }
.trouble h4 { margin: 0 0 4px; font-size: 15px; color: var(--dap-navy); }
.trouble p, .trouble ul { margin: 4px 0 0; font-size: 14px; color: var(--dap-navy-2); }

/* 묻고 답하기 */
.faq { margin: 12px 0; }
.faq dt { margin-top: 18px; font-weight: 700; color: var(--dap-navy); }
.faq dt::before { content: "Q. "; color: var(--dap-teal); }
.faq dd { margin: 4px 0 0; color: var(--dap-navy-2); }

/* 점검표 — 이 프로그램으로 할 수 있는 일 */
.checklist { list-style: none; margin: 10px 0; padding: 0; columns: 2 300px; column-gap: 28px; }
.checklist li { position: relative; margin: 0 0 8px; padding-left: 26px; color: var(--dap-navy-2); break-inside: avoid; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 15px; height: 15px;
  border: 1.5px solid var(--dap-teal); border-radius: 3px; background: var(--dap-teal-tint);
}
.checklist li a { color: inherit; }

/* ── 묶음 첫 화면 ────────────────────────────────── */
.guide-grid { display: grid; gap: 16px; margin: 18px 0; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.guide-grid a.doc {
  display: block; padding: 18px 18px 16px; border: 1px solid var(--dap-border); border-top: 3px solid var(--dap-teal);
  border-radius: var(--radius-md); background: var(--dap-white); color: inherit; text-decoration: none; box-shadow: var(--shadow);
}
.guide-grid a.doc.amber { border-top-color: var(--dap-amber); }
.guide-grid a.doc:hover { border-color: var(--dap-border-strong); }
.guide-grid a.doc img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--radius-sm); border: 1px solid var(--dap-border); margin-bottom: 12px; }
.guide-grid a.doc img.phone { object-fit: contain; object-position: center; background: var(--dap-surface); }
.guide-grid a.doc .who { display: block; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--dap-muted); }
.guide-grid a.doc .name { display: block; margin: 3px 0 6px; font-size: 17px; font-weight: 700; color: var(--dap-navy); }
.guide-grid a.doc .covers { display: block; font-size: 13.5px; color: var(--dap-navy-2); }

footer {
  max-width: 1240px; margin: 0 auto; padding: 28px 32px 56px;
  color: var(--dap-muted); font-size: 13px; border-top: 1px solid var(--dap-border);
}

/* ── 좁은 화면 ───────────────────────────────────── */
@media (max-width: 900px) {
  .guide-bar { padding: 8px 14px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 14px 48px; }
  .toc { display: none; }
  .toc-mobile { display: block; margin-top: 20px; background: var(--dap-white); border: 1px solid var(--dap-border); border-radius: var(--radius-lg); padding: 12px 16px; }
  .toc-mobile summary { cursor: pointer; font-weight: 700; }
  .toc-mobile a { display: block; padding: 5px 0; font-size: 14px; color: var(--dap-navy-2); text-decoration: none; }
  .cover { padding: 32px 16px 0; }
  .cover h1 { font-size: 26px; }
  .basis { margin: 28px -16px 0; padding: 12px 16px 0; }
  section { padding: 20px 16px; margin-top: 20px; }
  section > h2 { font-size: 20px; }
  .step { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .checklist { columns: 1; }
  footer { padding: 24px 16px 40px; }
}

/* ── 인쇄 ────────────────────────────────────────── */
@media print {
  body { background: #fff; font-size: 10.5pt; }
  .guide-bar, .toc, .toc-mobile { display: none !important; }
  .layout { display: block; max-width: none; padding: 0; }
  section { box-shadow: none; border: 1px solid #ddd; margin-top: 14px; }
  .cover { break-after: page; }
  .shot, .shots, .step, .callout, .trouble > div, .faq dt, .faq dd { break-inside: avoid; }
  h3, h4 { break-after: avoid; }
  .shot img { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}
