/* 사용 설명서 — 색·글꼴은 내려받기 페이지(site/index.html)·앱(web/app.css)과 같은 손글 토큰 */
/* 글꼴은 사이트에 넣은 Pretendard(site/fonts, OFL — web/fonts 와 같은 파일) — 바깥 CDN 에 요청하지 않는다(방문 기록이 제3자에게 가지 않게) */
@font-face { font-family: 'Pretendard Variable'; font-weight: 45 920; font-style: normal; font-display: swap; src: url('../fonts/PretendardVariable.woff2') format('woff2-variations'), url('../fonts/PretendardVariable.woff2') format('woff2'); }
:root {
  --bg:#F6F4EF; --surface:#FFFFFF; --surface-2:#F1EEE7; --line:#DCD7CC;
  --ink:#1C1F1D; --ink-2:#474C48; --ink-3:#636863;
  --primary:#1D6B50; --primary-soft:#E3F0EA; --warn:#B3261E; --warn-soft:#FBEAE8; --unverified:#D99A00; --focus:#1E4FB8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg:#161817; --surface:#1F2220; --surface-2:#2A2E2B; --line:#3A3F3B;
  --ink:#ECEDE9; --ink-2:#B9BDB7; --ink-3:#959A94;
  --primary:#5CC79C; --primary-soft:#1E3A2F; --warn:#FF8A80; --warn-soft:#3A2220; --focus:#8AB0FF;
  color-scheme: dark;
} }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.75 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--primary); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.4px; }
h1 { font-size: 36px; font-weight: 800; margin: 0 0 12px; }
h2 { font-size: 26px; font-weight: 800; margin: 64px 0 12px; padding-top: 8px; scroll-margin-top: 24px; }
h3 { font-size: 19px; font-weight: 700; margin: 32px 0 8px; scroll-margin-top: 24px; }
p, ol, ul { margin: 0 0 14px; }
ol, ul { padding-left: 1.4em; }
li { margin: 6px 0; }

/* 틀 — 왼쪽 목차 · 본문. 폰에서는 목차가 위로 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 18px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand small { font-weight: 500; color: var(--ink-3); font-size: 15px; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; margin-left: 18px; }
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; max-width: 1180px; margin: 0 auto; padding: 16px 24px 96px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 15px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.toc a[aria-current=page] { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.toc .n { display: inline-block; width: 1.4em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
main { max-width: 760px; min-width: 0; }
.lead { font-size: 19px; color: var(--ink-2); margin-bottom: 28px; }

/* 절 머리 — 할 일 · 걸리는 시간 · 준비물 */
.meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 20px; padding: 12px 16px; background: var(--surface-2); border-radius: 10px; font-size: 15px; color: var(--ink-2); }
.meta b { color: var(--ink); font-weight: 700; }

/* 번호 단계 */
ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin: 14px 0; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 700; display: grid; place-items: center; }

/* 화면 글자 · 키 */
b.ui { font-weight: 700; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; white-space: nowrap; }
kbd { font: 600 14px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 3px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); }
.path { white-space: nowrap; }
.x { color: var(--warn); font-weight: 800; }
.uv { text-decoration: underline wavy var(--unverified); text-underline-offset: 4px; }

/* 스크린숏 — 앱 화면은 라이트 테마로만 찍는다 */
figure.shot { margin: 18px 0 26px; }
figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(28,31,29,.06), 0 10px 30px rgba(28,31,29,.08); }
figure.shot figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-3); }

/* 알림 상자 */
.box { margin: 18px 0; padding: 14px 18px; border-radius: 10px; border-left: 4px solid var(--primary); background: var(--primary-soft); }
.box.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.box.done { border-left-color: var(--primary); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); }
.box > :last-child { margin-bottom: 0; }
.box strong:first-child { display: block; margin-bottom: 2px; }

/* 표 — 증상·해결, 용어 */
.table { width: 100%; overflow-x: auto; margin: 16px 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* 처음 페이지 — 목차 카드 */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0 8px; }
.cards a { display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.cards a:hover { border-color: var(--primary); }
.cards b { display: block; font-size: 18px; margin-bottom: 4px; }
.cards span { color: var(--ink-2); font-size: 15px; }

/* 이전·다음 */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-weight: 700; }
.pager small { display: block; color: var(--ink-3); font-weight: 500; }
.pager .next { margin-left: auto; text-align: right; }
footer { max-width: 1180px; margin: 0 auto; padding: 24px; color: var(--ink-3); font-size: 14px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 8px 16px 72px; }
  .top { padding: 14px 16px; }
  .top nav { display: none; }
  .toc { position: static; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--surface); }
  h1 { font-size: 29px; }
  h2 { font-size: 23px; margin-top: 48px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  b.ui { white-space: normal; }
}
.muted { font-size: 15px; color: var(--ink-3); margin-top: 20px; }
