/* docs.gitgit.kr 공통 스타일. 외부 글꼴이나 스크립트 없이 이 파일만 씁니다. */
:root {
    --bg: #ffffff;
    --surface: #f6f7f9;
    --border: #dfe3e8;
    --text: #16191d;
    --muted: #5b6470;
    --accent: #2743a6;
    --accent-soft: #e9edfb;
    --code-bg: #f1f3f6;
    --warn-bg: #fff6e0;
    --warn-border: #e6c15a;
    --font: "IBM Plex Sans KR", "Pretendard", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
    --bg: #0f1115;
    --surface: #171a20;
    --border: #2a2f38;
    --text: #e7eaee;
    --muted: #9aa3ae;
    --accent: #8fa6ff;
    --accent-soft: #1c2440;
    --code-bg: #1a1e25;
    --warn-bg: #2b2413;
    --warn-border: #7d6520;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 20; background: var(--bg); padding: 6px 10px; border: 1px solid var(--border); }

.topbar {
    position: sticky; top: 0; z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1120px; margin: 0 auto; padding: 0 20px;
    height: 56px; display: flex; align-items: center; gap: 16px;
}
.wordmark { font-family: var(--mono); font-weight: 600; font-size: 18px; color: var(--text); white-space: nowrap; }
.wordmark span { color: var(--muted); font-weight: 400; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.topbar-actions > * { white-space: nowrap; }
.icon-button {
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    border-radius: 6px; height: 32px; padding: 0 10px; font: inherit; font-size: 13px; cursor: pointer;
}
.icon-button:hover { background: var(--surface); }
.menu-button { display: none; }

.layout { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
.sidebar { position: sticky; top: 56px; align-self: start; padding: 28px 0; max-height: calc(100vh - 56px); overflow-y: auto; }
.sidebar h2 { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.sidebar ul { list-style: none; margin: 0 0 24px; padding: 0; }
.sidebar a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--text); font-size: 14.5px; }
.sidebar a:hover { background: var(--surface); text-decoration: none; }
.sidebar a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

main { padding: 36px 0 80px; min-width: 0; }
main h1 { font-size: 30px; line-height: 1.3; margin: 0 0 12px; }
main .lead { font-size: 17px; color: var(--muted); margin: 0 0 32px; }
main h2 { font-size: 22px; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--border); }
main h3 { font-size: 17px; margin: 28px 0 8px; }
main p, main ul, main ol { margin: 0 0 16px; }
main li { margin-bottom: 6px; }
main li > ul, main li > ol { margin-top: 6px; margin-bottom: 0; }

code { font-family: var(--mono); font-size: 0.9em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre {
    position: relative; margin: 0 0 20px; padding: 14px 16px; overflow-x: auto;
    background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: 13.5px; }
.copy-button {
    position: absolute; top: 8px; right: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--muted);
    border-radius: 5px; font: inherit; font-size: 12px; padding: 2px 8px; cursor: pointer;
}
.copy-button:hover { color: var(--text); }

.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); font-weight: 600; white-space: nowrap; }

.note, .warn { border-radius: 8px; padding: 12px 16px; margin: 0 0 20px; border: 1px solid var(--border); background: var(--surface); }
.note > :last-child, .warn > :last-child { margin-bottom: 0; }
.warn { background: var(--warn-bg); border-color: var(--warn-border); }
.note strong:first-child, .warn strong:first-child { display: block; margin-bottom: 2px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0 0 24px; padding: 0; list-style: none; }
.cards a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.cards a:hover { border-color: var(--accent); text-decoration: none; }
.cards strong { display: block; margin-bottom: 4px; color: var(--accent); }
.cards span { color: var(--muted); font-size: 14.5px; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 18px; }
.steps > li::before {
    content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; text-align: center; line-height: 26px;
}

.page-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 15px; }
footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: 13.5px; }
footer.site div { max-width: 1120px; margin: 0 auto; padding: 20px; }

@media (max-width: 860px) {
    .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .menu-button { display: inline-block; }
    /* 좁은 화면에서는 머리말이 두 줄로 넘어가지 않게 바깥 링크를 감춥니다. */
    .topbar-actions > a { display: none; }
    .topbar-actions { gap: 8px; }
    .sidebar { display: none; position: static; max-height: none; padding: 16px 0 0; border-bottom: 1px solid var(--border); }
    body.menu-open .sidebar { display: block; }
    main { padding-top: 24px; }
    main h1 { font-size: 25px; }
}
