/* Spresso 웹 가이드 — 색은 콘솔(main/web tailwind)의 보라 #441CF2·글자 #252427·회색 계열 */
:root {
  --brand: #441cf2; --brand-soft: #e9e4fd; --brand-ink: #3412c7; --solid: #441cf2;
  --text: #252427; --text-2: #49494d; --muted: #5f5e65; --faint: #737279;
  --bg: #ffffff; --surface: #f9f9fa; --surface-2: #eeeef0; --border: #e3e3e8;
  --callout: #f4f4f6; --code: #f1f0f7; --warn: #d97706; --shadow: 0 1px 2px rgba(20, 18, 40, .06), 0 8px 24px rgba(20, 18, 40, .06);
  --top: 60px; --side: 280px; --toc: 220px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #8f7bff; --brand-soft: #241b52; --brand-ink: #b3a6ff; --solid: #4b27f0;
  --text: #ececf1; --text-2: #c9c9d1; --muted: #a0a0aa; --faint: #8c8b95;
  --bg: #141318; --surface: #1b1a20; --surface-2: #26252c; --border: #2e2d35;
  --callout: #1f1e25; --code: #26243a; --warn: #f59e0b; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #8f7bff; --brand-soft: #241b52; --brand-ink: #b3a6ff; --solid: #4b27f0;
    --text: #ececf1; --text-2: #c9c9d1; --muted: #a0a0aa; --faint: #8c8b95;
    --bg: #141318; --surface: #1b1a20; --surface-2: #26252c; --border: #2e2d35;
    --callout: #1f1e25; --code: #26243a; --warn: #f59e0b; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.75 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }
html { accent-color: var(--brand); caret-color: var(--brand); scrollbar-color: var(--surface-2) transparent; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.side, .toc, .sres { scrollbar-width: thin; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 위 막대 */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 17px; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand span { color: var(--muted); font-weight: 500; }
.search { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--faint); font-size: 14px; min-width: 220px; justify-content: space-between; }
.search:hover { border-color: var(--brand); }
.search span { margin-right: auto; }
kbd { font: 12px/1 inherit; padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--muted); }
.theme, .menu { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text-2); }
.theme:hover, .menu:hover { border-color: var(--brand); color: var(--brand); }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; } :root[data-theme="dark"] .theme .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme .sun { display: none; } :root:not([data-theme="light"]) .theme .moon { display: block; } }
.menu { display: none; }
.console { height: 38px; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; background: var(--solid); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; gap: 6px; }
.console:hover { text-decoration: none; filter: brightness(1.12); }
.console .ic { width: 15px; height: 15px; stroke-width: 2.2; }

/* 세 칸 */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--toc); max-width: 1440px; margin: 0 auto; }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 24px 16px 48px 20px; border-right: 1px solid var(--border); font-size: 14.5px; }
.ns { margin-bottom: 22px; }
.nt { font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--text); padding: 0 10px 6px; }
.ng { font-size: 12px; color: var(--faint); padding: 8px 10px 2px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text-2); line-height: 1.4; }
.side a:hover { background: var(--surface-2); text-decoration: none; }
.side a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.side .sub { display: none; margin: 2px 0 4px 18px; padding-left: 8px; border-left: 1px solid var(--border); }
.side li.open > .sub { display: block; }
.soonbox { margin-top: 8px; padding: 14px 10px 0; border-top: 1px solid var(--border); }
.soonbox .nt { padding: 0 0 6px; color: var(--muted); }
.soonbox ul li { padding: 3px 0; color: var(--faint); font-size: 14px; }
.ni { width: 18px; height: 18px; flex: none; display: inline-grid; place-items: center; font-size: 14px; border-radius: 4px; object-fit: contain; }

main { min-width: 0; padding: 40px 56px 96px; }
article { max-width: 760px; }
.crumb { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; font-size: 13px; color: var(--faint); margin-bottom: 6px; }
.crumb .ed { white-space: nowrap; }
.crumb .cm { display: flex; align-items: center; gap: 10px; margin-left: auto; white-space: nowrap; }
.crumb .mdl { padding: 0 7px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.crumb .mdl:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.crumb a { color: var(--muted); }
h1 { font-size: 34px; line-height: 1.3; letter-spacing: -.02em; margin: 0 0 28px; display: flex; align-items: center; gap: 12px; }
h1 .pi { font-size: 32px; } h1 img.pi { width: 36px; height: 36px; border-radius: 8px; }
h2, h3, h4 { line-height: 1.4; letter-spacing: -.01em; margin: 48px 0 14px; }
h2 { font-size: 24px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
h3 { font-size: 19px; margin-top: 34px; } h4 { font-size: 16.5px; margin-top: 26px; color: var(--text-2); }
article > h2:first-of-type { margin-top: 8px; }
.hl { color: inherit; } .hl:hover { text-decoration: none; }
.hl::after { content: " #"; color: var(--faint); opacity: 0; font-weight: 400; }
.hl:hover::after { opacity: 1; }
p { margin: 10px 0; }
strong { font-weight: 650; }
ul, ol { padding-left: 1.4em; margin: 10px 0; }
li { margin: 4px 0; } li > p { margin: 2px 0; } li::marker { color: var(--faint); }
ol > li::marker { color: var(--brand); font-weight: 700; }
code { font: .88em/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--code); padding: 2px 6px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
figure { margin: 16px 0 20px; }
figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); background: #fff; }
.zoom { cursor: zoom-in; display: inline-block; max-width: 100%; }
.callout { display: flex; gap: 12px; margin: 18px 0; padding: 14px 18px; background: var(--callout); border-radius: 12px; border: 1px solid var(--border); }
.callout .ci { font-size: 18px; line-height: 1.6; flex: none; }
.callout .cb { min-width: 0; } .callout .cb > :first-child { margin-top: 0; } .callout .cb > :last-child { margin-bottom: 0; }
.tw { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 10px; }
article[data-page="glossary"] .tw td:first-child { min-width: 8.5em; }  /* 용어집: 용어 칸이 한두 글자씩 꺾이지 않게 */
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); font-weight: 650; } tr:last-child td { border-bottom: 0; }
details { margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; }
summary { padding: 10px 14px; cursor: pointer; font-weight: 600; } .dt { padding: 0 16px 8px; }
/* 단계 안 접힌 질문(안 되면 …): 단계 글보다 한 단계 작게 */
li details { margin: 8px 0 10px; background: var(--surface); font-size: 15px; }
li details summary { padding: 7px 12px; font-weight: 600; color: var(--text-2); }
li details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 8px; }
li details .dt { padding: 0 14px 6px; }
summary:hover { color: var(--brand); }
figcaption { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--faint); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 18px 0; }
.card { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--bg); }
.card:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow); }
.ci2 { width: 24px; height: 24px; display: inline-grid; place-items: center; font-size: 18px; object-fit: contain; border-radius: 5px; }
.soon-tag { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.basis { margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); font-size: 14px; font-weight: 600; }
/* 문서 틀: 단계 번호 배지 · 주의 콜아웃 · STEP 막대 · 좁은 화면 목차 · 용어 말풍선 · 문서 아래 */
article > ol { list-style: none; padding-left: 0; counter-reset: st var(--s, 0); }
article > ol > li { counter-increment: st; position: relative; padding-left: 38px; margin: 12px 0; }
article > ol > li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: 13px; font-weight: 700; line-height: 1; }
article > ol > li:not(:last-child)::after { content: ""; position: absolute; left: 11.5px; top: 32px; bottom: -10px; width: 1px; background: var(--border); }
.callout.head { background: color-mix(in srgb, var(--brand) 6%, var(--callout)); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.callout.warn { background: color-mix(in srgb, var(--warn) 8%, var(--callout)); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.callout.help { margin-top: 40px; background: var(--bg); font-size: 15px; }
.stepbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 14px; font-size: 12.5px; }
.stepbar .sl { color: var(--faint); margin-right: 6px; }
.stepbar a:not(.sl) { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); font-weight: 600; line-height: 1; }
.stepbar a.done { background: var(--surface-2); border-color: transparent; }
.stepbar a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepbar a:hover { text-decoration: none; border-color: var(--brand); }
.mtoc { display: none; margin: -12px 0 20px; font-size: 14px; }
.mtoc summary { font-weight: 600; color: var(--text-2); }
.mtoc a { display: block; padding: 4px 16px; color: var(--muted); } .mtoc a.l3 { padding-left: 30px; font-size: 13.5px; }
.mtoc[open] { padding-bottom: 8px; }
a.term { text-decoration: underline dotted; text-underline-offset: 3px; position: relative; }
a.term:hover::after, a.term:focus-visible::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: min(340px, 80vw); padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text-2); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 400; line-height: 1.6; white-space: normal; pointer-events: none; }
tr[id] { scroll-margin-top: calc(var(--top) + 16px); }
tr:target td { background: var(--brand-soft); }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mrow > a:first-child { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.mrow > a:first-child:hover { color: var(--brand); text-decoration: none; }
.mrow .mx { flex: none; font-size: 12.5px; color: var(--faint); }
.mrow .mx:hover { color: var(--brand); }
/* 오류 사전 거르기(guide.js가 trouble-errors 맨 위에 넣는다) */
article [hidden] { display: none !important; }
.efilter { margin: -8px 0 28px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.efilter label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.efi { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.efi:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.efi .ic { color: var(--muted); }
.efi input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 16px; color: var(--text); }
.efi input::placeholder { color: var(--faint); }
.efc { flex: none; font-size: 13px; font-weight: 650; color: var(--brand-ink); }
.echips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; }
.echips span { color: var(--faint); margin-right: 2px; }
.echips a { padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text-2); line-height: 1.6; white-space: nowrap; }
.echips a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.enone { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
mark.fm { background: color-mix(in srgb, var(--brand) 18%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
/* 다음 단계 카드: 카드 전체가 첫 문서 링크로 간다(.go::after). 배지 STEP n · 선택 · 막히면 */
.nextc { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 16px 0; }
.nc { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 44px 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); font-size: 15px; line-height: 1.6; color: var(--text-2); }
.nc.link:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.nc p { margin: 0; }
.nc a { position: relative; z-index: 1; }
.nc a.go { position: static; font-weight: 650; }
.nc a.go::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.nc a.go:hover { text-decoration: none; }
.nc .nct { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 16px; line-height: 1.45; }
.nc.link:hover .nct, .nc.link:hover a.go { color: var(--brand); }
.nc .nct .ni { font-size: 16px; }
.nc .na { position: absolute; right: 16px; top: 50%; margin-top: -9px; color: var(--faint); }
.nc.link:hover .na { color: var(--brand); }
.nbs { display: flex; gap: 6px; margin-bottom: 2px; }
.nb { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.7; letter-spacing: .02em; }
.nb.s { background: var(--brand-soft); color: var(--brand-ink); }
.nb.o { background: var(--surface-2); color: var(--muted); }
.nb.w { background: color-mix(in srgb, var(--warn) 16%, var(--bg)); color: var(--text); }
.pn { max-width: 760px; display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.pn a { flex: 1; max-width: 50%; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-weight: 600; }
.pn a:hover { border-color: var(--brand); text-decoration: none; }
.pn small { display: block; font-weight: 400; color: var(--faint); font-size: 12.5px; }
.pn .nx { text-align: right; margin-left: auto; }

/* 오른쪽 목차 */
.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 40px 20px 40px 8px; font-size: 13.5px; }
.toc .tt { font-weight: 700; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.toc a { display: block; padding: 4px 0 4px 12px; color: var(--muted); border-left: 2px solid var(--border); line-height: 1.45; }
.toc a.l3 { padding-left: 24px; font-size: 13px; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.on { color: var(--brand); border-left-color: var(--brand); }

/* 첫 화면 (home.md + nav.md로 만든다): 머리 → 처음 시작하기 → 할 일 → 기능별 → 더 찾아보기 */
.layout.wide { grid-template-columns: var(--side) minmax(0, 1fr); }
.hm { max-width: 1040px; }
.hm > .callout { max-width: 760px; }
.hm .off { color: var(--faint); }
.hero { padding: 20px 0 4px; max-width: 760px; }
.hero h1 { font-size: 40px; margin-bottom: 10px; }
.hero .lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; }
.hsearch { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 620px; height: 52px; padding: 0 12px 0 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--faint); font-size: 16px; text-align: left; box-shadow: var(--shadow); }
.hsearch:hover { border-color: var(--brand); }
.hsearch span { margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsearch .ic { width: 20px; height: 20px; color: var(--muted); }
.qchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; font-size: 13.5px; color: var(--faint); }
.qchips span { margin-right: 2px; }
.qchips button { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 2px 11px; font-size: 13.5px; line-height: 1.6; }
.qchips button:hover { border-color: var(--brand); color: var(--brand); }
.hmeta { margin: 14px 0 0; font-size: 13px; color: var(--faint); }
.hmeta a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.hmeta a:hover { color: var(--brand); }

.hsec { margin-top: 56px; }
.hsec > h2 { font-size: 24px; margin: 0 0 6px; padding: 0; border: 0; }
.hsub { color: var(--muted); margin: 0 0 18px; }
.hsec h3 { margin: 0; }

/* 처음 시작하기: 두 갈래 + STEP 카드 */
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 760px; margin: 0 0 20px; }
.paths a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 600; line-height: 1.45; }
.paths a small { color: var(--brand); font-size: 13.5px; font-weight: 600; }
.paths a:hover { border-color: var(--brand); text-decoration: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { position: relative; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 18px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.step:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.step.pre { background: var(--surface); }
.step .sn { padding: 1px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 700; letter-spacing: .03em; line-height: 1.7; }
.step .st { color: var(--text); font-size: 16.5px; font-weight: 700; line-height: 1.4; }
.step a.st::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.step a.st:hover { text-decoration: none; }
.step p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.step .sk { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13.5px; line-height: 1.7; }
.step .sk a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.step .sk a:hover { color: var(--brand); text-decoration-color: currentColor; }
.step .sm { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.step .sm span { display: flex; align-items: flex-start; gap: 5px; }
.step .sm .ic { width: 14px; height: 14px; margin-top: 2px; }
.stuck { max-width: 760px; margin-top: 16px; }

/* 할 일 카드 */
.tasks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.task { position: relative; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.task:hover { border-color: var(--brand); }
.tt2 { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15.5px; font-weight: 650; line-height: 1.4; }
a.tt2::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
a.tt2:hover { text-decoration: none; }
.ti { font-size: 17px; }
.tl { position: relative; z-index: 1; display: flex; flex-direction: column; margin-top: 6px; font-size: 13.5px; line-height: 1.6; }
.tl a { color: var(--muted); align-self: flex-start; }
.tl a:hover { color: var(--brand); }

/* 기능별: 사이드바 순서, 여러 단 */
.ref { columns: 3 240px; column-gap: 32px; }
.rg { break-inside: avoid; margin: 0 0 20px; }
.rg h3 { font-size: 13px; font-weight: 650; color: var(--faint); letter-spacing: .02em; margin: 0 0 4px; }
.rg a, .rg .off { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.rg a:hover { color: var(--brand); text-decoration: none; }
.rg .kid { padding-left: 26px; font-size: 13.5px; color: var(--muted); }

/* 더 찾아보기 */
.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mc { position: relative; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.mc h3 { font-size: 16px; margin: 0 0 8px; }
.mc h3 a { color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.mc h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.mc:has(h3 a):hover { border-color: var(--brand); }
.mc h3 a:hover { text-decoration: none; }
.mc p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.mc > a, .mc > .off { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.mc > a:hover { color: var(--brand); text-decoration: none; }
.mg { font-size: 12px; color: var(--faint); margin-top: 6px; }

/* 검색 */
.sdlg { position: fixed; inset: 0; z-index: 50; background: rgba(15, 13, 30, .45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.sdlg[hidden] { display: none; }
.sbox { width: min(640px, 100%); background: var(--bg); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); overflow: hidden; border: 1px solid var(--border); }
.sbox input { width: 100%; border: 0; border-bottom: 1px solid var(--border); padding: 18px 20px; font: inherit; font-size: 17px; background: var(--bg); color: var(--text); outline: none; }
.sres { max-height: 60vh; overflow-y: auto; padding: 6px; }
.sres a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text); }
.sres a:hover, .sres a.sel { background: var(--brand-soft); text-decoration: none; }
.sres b { display: block; font-size: 15px; } .sres small { color: var(--faint); font-size: 12px; }
.sres span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.sres mark { background: none; color: var(--brand); font-weight: 700; }
.sres .none { padding: 18px; color: var(--faint); font-size: 14px; }

/* 이미지 크게 보기 */
.lb { position: fixed; inset: 0; z-index: 60; background: rgba(10, 9, 20, .82); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lb img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }

.scrim { display: none; }
@media (max-width: 1180px) { .layout { grid-template-columns: var(--side) minmax(0, 1fr); } .toc { display: none; } .mtoc { display: block; } .tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1060px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .layout { display: block; }
  .menu { display: block; }
  .side { position: fixed; top: var(--top); left: 0; bottom: 0; height: auto; width: min(300px, 86vw); background: var(--bg); z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(15, 13, 30, .4); z-index: 35; }
  main { padding: 24px 16px 72px; }
  .top { padding: 0 12px; gap: 8px; }
  .search { min-width: 0; width: 38px; padding: 0; justify-content: center; color: var(--text-2); }
  .search span, .search kbd { display: none; }
  .hsearch kbd { display: none; }  /* 터치 화면에는 / 단축키가 없다 */
  .console { display: none; }
  h1 { font-size: 27px; } .hero h1 { font-size: 30px; }
  .hero .lead { font-size: 16px; } .hsearch { height: 48px; font-size: 15px; }
  .hsec { margin-top: 44px; } .hsec > h2 { font-size: 21px; }
  .paths, .steps { grid-template-columns: minmax(0, 1fr); }
  .tasks { gap: 8px; } .task { padding: 12px 14px; }
  h2 { font-size: 21px; }
  .pn { flex-direction: column; } .pn a { max-width: none; } .pn .nx { margin-left: 0; }
  .efilter { padding: 14px; margin-top: -12px; }
  .echips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 14px; }
  .echips::-webkit-scrollbar { display: none; }
  .echips span { flex: none; }
  .tw th:first-child, .tw td:first-child { min-width: 7.5em; }  /* 좁은 화면에서 첫 칸(화면 문구 등)이 한 글자씩 꺾이지 않게 — 넘치면 표 안에서 가로로 민다 */
}

/* 인쇄: 글만(위 막대·목차·이전/다음·거르기 칸 빼고), 늘 밝은 색 */
@media print {
  :root:not(#_) { --brand: #441cf2; --brand-soft: #e9e4fd; --brand-ink: #3412c7; --text: #252427; --text-2: #49494d; --muted: #5f5e65; --faint: #737279;
    --bg: #fff; --surface: #f9f9fa; --surface-2: #eeeef0; --border: #e3e3e8; --callout: #f4f4f6; --code: #f1f0f7; --shadow: none; color-scheme: light; }
  .top, .side, .toc, .scrim, .sdlg, .pn, .mtoc, .stepbar, .efilter, .crumb .mdl, .nc .na, .lb { display: none !important; }
  .layout { display: block; max-width: none; } main { padding: 0; } article { max-width: none; }
  body { font-size: 11pt; line-height: 1.6; }
  h2, h3, h4 { break-after: avoid; } figure, .callout, .nc, tr { break-inside: avoid; }
  a { color: inherit; }
}
