:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2433;
  --muted: #5d6677;
  --line: #e4e1d8;
  --accent: #1f4fd8;
  --accent-text: #ffffff;
  --soft: #eef2fd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151c;
    --surface: #1a1f29;
    --text: #eceff5;
    --muted: #a3acbd;
    --line: #2b3240;
    --accent: #7ea0ff;
    --accent-text: #0e1320;
    --soft: #1b2438;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  line-height: 1.7;
  font-size: 17px;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

header.site { padding: 20px 0; }
header.site .wrap { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
header.site nav a { color: var(--muted); text-decoration: none; margin-left: 16px; font-size: 15px; }
header.site nav a:hover { color: var(--text); }

h1 { font-size: clamp(1.7rem, 5.5vw, 2.4rem); line-height: 1.3; letter-spacing: -0.02em; margin: 40px 0 16px; text-wrap: balance; }
h2 { font-size: 1.35rem; line-height: 1.4; letter-spacing: -0.01em; margin: 48px 0 12px; }
h3 { font-size: 1.05rem; margin: 24px 0 6px; }
p { margin: 0 0 14px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 10px;
  border: 0;
  font-size: 1rem;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn.secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 12px 0;
}
.card h3 { margin-top: 0; }

ul.plain { padding-left: 20px; margin: 8px 0 14px; }
ul.plain li { margin: 4px 0; }

.note {
  background: var(--soft);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.95rem;
  margin: 18px 0;
}

.tpl-group { margin-top: 40px; }
.tpl {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0;
}
.tpl .label { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.tpl .body { margin: 0 0 10px; }
.copy {
  font: inherit;
  font-size: 0.875rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
.copy:hover { background: var(--soft); }

footer.site { margin-top: 64px; padding: 28px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
footer.site a { color: var(--muted); }

table.doc { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 12px 0; }
table.doc th, table.doc td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
table.doc th { width: 7.5rem; font-weight: 700; }

a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 자료실 (files.html) */
.file-card .fname { font-size: 0.95rem; color: var(--muted); overflow-wrap: anywhere; margin-bottom: 8px; }
.file-card .btn { display: block; text-align: center; font-size: 1.1rem; padding: 16px 22px; }
.btn-col { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.btn-col .btn { text-align: center; font-size: 1.05rem; padding: 16px 22px; }

/* 한글 단어 단위 줄바꿈, 제목 + 부제목 */
body { word-break: keep-all; overflow-wrap: break-word; }
h1 .subtitle { display: block; margin-top: 8px; font-size: 0.55em; font-weight: 500; letter-spacing: 0; line-height: 1.4; color: var(--muted); }

/* 크몽 안내 상자 · 샘플 목록 · 쪽 나누기 · 상세 페이지 */
.cta-box { background: var(--soft); border-radius: 12px; padding: 14px 16px; margin: 20px 0 8px; }
.cta-box p { margin: 0 0 10px; font-weight: 600; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-btns .btn { flex: 1 1 220px; text-align: center; padding: 12px 16px; font-size: 0.95rem; }

ol.sample-list { list-style: none; margin: 12px 0; padding: 0; }
.sample-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; text-decoration: none; color: var(--text); }
.sample-row:hover { border-color: var(--accent); }
.sample-row .no { flex: none; font-weight: 700; font-size: 1.1rem; color: var(--accent); min-width: 1.9em; }
.sample-row .info { flex: 1; min-width: 0; }
.sample-row .t { display: block; font-weight: 700; }
.sample-row .d { display: block; font-size: 0.92rem; color: var(--muted); line-height: 1.5; }
.sample-row::after { content: "›"; flex: none; color: var(--muted); font-size: 1.4rem; }
.new { display: inline-block; background: var(--accent); color: var(--accent-text); font-size: 0.72rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; vertical-align: middle; margin-left: 4px; }

.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--surface); }
.pager span[aria-current] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }

.back { display: inline-block; margin-top: 8px; font-size: 0.95rem; }
.shot { margin: 18px 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.shot figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 6px; }
ol.steps { padding-left: 22px; }
ol.steps li { margin: 6px 0; }
.pager[hidden] { display: none; }
