/* 연봉도감 — 한 단 본문, 숫자 우선. 포인트 컬러는 순수 주황(공공기관 색·형제 사이트와 다르게). */
:root {
  --pri: #ea580c; --pri-soft: #fff7ed; --pri-text: #c2410c; --on-pri: #ffffff;
  --bg: #ffffff; --bg-2: #f6f7f9; --line: #e7e9ee; --line-2: #d5d9e1;
  --ink: #15171c; --ink-2: #4b5160; --ink-3: #68707f; --cap: #c2410c; --cap-bg: #fff7ed;
  --r: 12px; --w: 960px;
  --f: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  /* 지도 5구간(단일 색상 순차, dataviz 검증기 light/ordinal 통과) */
  --m1: #86b6ef; --m2: #5598e7; --m3: #2a78d6; --m4: #1c5cab; --m5: #104281; --m-hatch: rgba(255,255,255,.75);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --pri: #fb923c; --pri-soft: #3a2414; --pri-text: #fdba74; --on-pri: #15171c;
    --bg: #121317; --bg-2: #1b1d23; --line: #2a2d35; --line-2: #3a3e48;
    --ink: #f1f2f5; --ink-2: #b4b8c3; --ink-3: #868b97; --cap: #fdba74; --cap-bg: #3a2414;
    /* 다크: 값이 클수록 밝게(dataviz 검증기 dark/ordinal 통과) */
    --m1: #184f95; --m2: #256abf; --m3: #3987e5; --m4: #6da7ec; --m5: #b7d3f6; --m-hatch: rgba(18,19,23,.8);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--f); letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--pri-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
/* 간격 리듬: 종류가 다른 블록(문단·표·목록·수치 카드)이 0px 로 붙지 않게 하는 기본 흐름 간격. 뒤에 오는 개별 규칙이 이긴다 */
main > * + *, .sec > * + * { margin-top: 10px; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; top: 8px; }

.bar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar-in { max-width: var(--w); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; font-size: 18px; letter-spacing: -.03em; flex: none; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mark { flex: none; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--bg-2); text-decoration: none; }
.nav a[aria-current] { color: var(--pri-text); background: var(--pri-soft); }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 16px; padding-bottom: 48px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--ink-3); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--ink-3); }
h1 { font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -.035em; margin: 14px 0 8px; }
.lede { color: var(--ink-2); font-size: 16px; }
.sec { margin-top: 36px; }
.sec h2, .intent-results h2 { font-size: 20px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 12px; }
.sec h3 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; margin: 16px 0 6px; }
.note { color: var(--ink-3); font-size: 14px; margin-bottom: 10px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.stats div { background: var(--bg-2); border-radius: var(--r); padding: 14px 16px; }
.stats dt { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.stats dd { font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.intent-results { margin-top: 22px; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r); }
.intent-results h2 { margin: 0 0 10px; }
.intent-facets { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.intent-facets::-webkit-scrollbar { display: none; }
.intent-facets a { flex: none; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.intent-facets a:hover { border-color: var(--pri); color: var(--pri-text); text-decoration: none; }
.intent-meta { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 6px; color: var(--ink-3); font-size: 13px; }
.intent-meta strong { color: var(--ink); }
.intent-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.intent-list > li { display: flex; gap: 8px; min-width: 0; padding: 10px; background: var(--bg-2); border-radius: 9px; }
.intent-rank { color: var(--ink-3); font-size: 12px; font-weight: 700; }
.intent-item { min-width: 0; }
.intent-item > a { display: block; overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.intent-item dl { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-size: 12px; }
.intent-item dl div { display: flex; gap: 4px; }
.intent-item dt { color: var(--ink-3); }
.intent-item dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.brief { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 6px; }
.brief li { position: relative; padding-left: 14px; color: var(--ink-2); }
.brief li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--pri); }
.formula { font-size: 18px; font-weight: 700; padding: 16px 18px; background: var(--pri-soft); border-radius: var(--r); margin-bottom: 8px; }
[hidden] { display: none !important; }
.tool-meta { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-2); font-size: 13px; }
.tool-meta dl { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.tool-meta dl div { display: flex; gap: 6px; }
.tool-meta dt { color: var(--ink-3); }
.tool-meta dd { font-weight: 700; }
.tool-meta p { margin-top: 6px; color: var(--ink-3); }
.tool-form { margin-top: 20px; padding: 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); }
.tool-form fieldset { padding: 0; margin: 0; border: 0; }
.tool-form legend { font-weight: 800; margin-bottom: 10px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tool-form label { display: grid; gap: 4px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.tool-form label.choice { display: inline-flex; grid-auto-flow: column; align-items: center; margin: 0 18px 12px 0; }
.tool-form input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; }
.tool-form .choice input { width: auto; min-height: 0; }
.tool-form button { min-height: 44px; margin-top: 14px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--pri-text); color: var(--on-pri); font: inherit; font-weight: 800; white-space: nowrap; cursor: pointer; }
.tool-result { display: grid; gap: 2px; margin-top: 14px; padding: 14px 16px; border-left: 3px solid var(--pri); background: var(--bg); color: var(--ink-2); }
.tool-result strong { color: var(--ink); font-size: 18px; }
.tool-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tool-list a { display: grid; gap: 4px; height: 100%; box-sizing: border-box; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); }
.tool-list a:hover { border-color: var(--pri); text-decoration: none; }
.tool-list span { color: var(--ink-3); font-size: 13px; }

.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.t { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.t caption { text-align: left; padding: 10px 14px; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.t th, .t td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.t thead th { font-size: 13px; color: var(--ink-3); font-weight: 600; background: var(--bg-2); white-space: nowrap; }
.t tbody tr:last-child > * { border-bottom: 0; }
.t tbody th { font-weight: 600; min-width: 140px; }
.t .n { text-align: right; white-space: nowrap; }
.t .r { color: var(--ink-3); width: 1%; white-space: nowrap; }
.t .ind { color: var(--ink-2); font-size: 13.5px; min-width: 120px; }
.calc th { font-weight: 500; color: var(--ink-2); }
.cap { display: inline-block; font-size: 11px; font-weight: 700; color: var(--cap); background: var(--cap-bg); border-radius: 4px; padding: 0 5px; vertical-align: 2px; }

.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.links li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.links span { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pager a, .pager span { min-width: 36px; text-align: center; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; }
.pager a, .pager span { white-space: nowrap; }
.pager span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.faq h3 { margin-bottom: 4px; }
.faq p { color: var(--ink-2); }

.company-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.company-photo { margin: 0; min-width: 0; }
.company-photo img { display: block; width: 100%; height: 210px; object-fit: cover; border-radius: var(--r); background: var(--bg-2); }
.company-photo figcaption { margin-top: 5px; color: var(--ink-3); font-size: 12px; }
.company-cards { display: grid; border-top: 1px solid var(--line); }
.company-cards > li { display: flex; align-items: center; gap: 14px; min-height: 108px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.company-card-copy { flex: 1; min-width: 0; position: relative; padding-left: 24px; }
.company-card-rank { position: absolute; left: 0; top: 1px; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.company-card-copy > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-card-copy dl { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 5px; color: var(--ink-2); font-size: 12.5px; }
.company-card-copy dl div { display: flex; gap: 4px; min-width: 0; }
.company-card-copy dt { color: var(--ink-3); }
.company-card-copy dd { font-weight: 600; }
.company-thumb-link { flex: none; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; }
.company-thumb { display: block; width: 88px; height: 88px; object-fit: cover; background: var(--bg-2); }

.src { margin-top: 40px; padding: 14px 16px; background: var(--bg-2); border-radius: var(--r); font-size: 13.5px; color: var(--ink-2); display: grid; gap: 4px; }
.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 13.5px; color: var(--ink-3); }
.foot p + p { margin-top: 4px; }
.foot a { color: var(--ink-2); }

/* 첫 화면 답 · 분포 위치 · 구간 막대 */
.answer { margin-top: 18px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.answer h2 { font-size: 14px; margin: 0 0 4px; color: var(--ink-3); font-weight: 600; }
.answer p { color: var(--ink); font-size: 18px; line-height: 1.55; font-weight: 700; }
.pos-h { font-size: 16px; font-weight: 600; margin: 18px 0 8px; }
.pos { display: grid; gap: 8px; }
.pos li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 2fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.pos-l small { color: var(--ink-3); }
.pos-t { position: relative; height: 8px; border-radius: 4px; background: var(--line-2); }
.pos-m { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.pos-v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist-bar { display: inline-block; width: calc(var(--w) * .6); max-width: 60%; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--m3); vertical-align: 1px; }

/* 단계구분도 */
.mapfig { margin: 0 0 16px; }
.chmap { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; }
.chmap path { stroke: var(--bg); stroke-width: .8; stroke-linejoin: round; }
.chmap a:hover path, .chmap a:focus path { stroke: var(--ink); stroke-width: 1.6; }
.mc1 { fill: var(--m1); } .mc2 { fill: var(--m2); } .mc3 { fill: var(--m3); } .mc4 { fill: var(--m4); } .mc5 { fill: var(--m5); }
.chmap path { fill-rule: evenodd; }
.sw.mc1 { background: var(--m1); } .sw.mc2 { background: var(--m2); } .sw.mc3 { background: var(--m3); } .sw.mc4 { background: var(--m4); } .sw.mc5 { background: var(--m5); }
.chmap .mh { fill: url(#hatch); pointer-events: none; stroke: none; }
.mh-l { stroke: var(--m-hatch); stroke-width: 2; }
.m-l text { font-size: 15px; font-weight: 600; fill: var(--ink); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend small { color: var(--ink-3); }
.sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.sw-h { position: relative; overflow: hidden; background: var(--m3); }
.sw-h::after { content: ""; position: absolute; width: 20px; border-top: 2px solid var(--m-hatch); transform: rotate(-45deg); left: -3px; top: 6px; }
.mapfig figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
@media (prefers-reduced-motion: no-preference) { .chmap path { transition: stroke-width .12s; } }

@media (max-width: 640px) {
  .bar-in { gap: 12px; }
  .brand span { display: none; }
  h1 { font-size: 23px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats dd { font-size: 18px; }
  .intent-results { margin-top: 16px; padding: 13px; }
  .intent-results h2 { font-size: 18px; }
  .intent-list { grid-template-columns: 1fr; }
  .intent-list > li:nth-child(n+3) { display: none; }
  .t { font-size: 14px; }
  .t th, .t td { padding: 8px 10px; }
}
.dir { columns: 2 16rem; gap: 1.5rem; padding-left: 1.1rem; margin: .5rem 0; }
.dir li { break-inside: avoid; margin: .15rem 0; }
/* 수요순은 화면에서도 왼쪽→오른쪽→다음 줄. 가나다 목록의 세로 열 구성은 유지한다. */
.dir[data-priority] { columns: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); column-gap: 3rem; padding-left: 2.5rem; }
.mute { color: var(--ink-3, #777); font-size: 13px; }

/* GNB 검색: 기존 로고·메뉴 옆에 고정 공간을 두고, 결과는 본문 위에 펼친다. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav { flex: 1; min-width: 0; }
.gnb-search { position: relative; flex: 0 0 210px; height: 36px; display: flex; align-items: center; }
.search-panel { width: 100%; }
.search-form { display: flex; align-items: center; height: 40px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--bg-2); }
.search-form:focus-within { border-color: var(--pri-text); }
.search-form input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 8px 0 8px 13px; font: inherit; font-size: 14px; }
.search-form input::placeholder { color: var(--ink-2); opacity: 1; }
.search-submit, .search-close, .search-toggle { display: inline-flex; align-items: center; justify-content: center; border: 0; color: var(--ink-2); background: transparent; flex: none; font: inherit; cursor: pointer; }
.search-submit { width: 40px; height: 40px; border-radius: 50%; }
.search-toggle, .search-close { display: none; }
.search-popup { position: absolute; top: 44px; right: 0; width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 620px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); }
.search-status { padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.search-kind { padding: 8px 14px 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); border-top: 1px solid var(--line); }
.search-result { display: grid; gap: 2px; padding: 10px 14px; color: var(--ink); }
.search-result:hover, .search-result[aria-selected="true"] { background: var(--pri-soft); text-decoration: none; }
.search-result-name { font-size: 14px; font-weight: 700; }
.search-result-detail { font-size: 12px; color: var(--ink-2); }
.search-all, .search-hub { display: block; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.search-hub { color: var(--ink-2); }
.search-page-form { display: flex; gap: 8px; }
.search-page-form input { min-width: 0; flex: 1; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); background: var(--bg); font: inherit; }
.search-page-form button, .search-more { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--pri-text); color: var(--on-pri); font: inherit; font-weight: 700; cursor: pointer; }
.search-page-status { margin-top: 14px; min-height: 3.2em; color: var(--ink-2); }
/* 지연 로드 중에도 아래 안내·푸터를 첫 화면 밖에 두어 결과 추가 시 밀림을 막는다. */
.search-page-results { min-height: max(360px, calc(100svh - 300px)); }
.search-page-list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.search-page-list li + li { border-top: 1px solid var(--line); }
.search-more { margin-top: 20px; }
@media (max-width: 899px) {
  .gnb-search { flex-basis: 44px; width: 44px; }
  .search-toggle { display: inline-flex; width: 44px; height: 44px; border-radius: 8px; }
  .search-panel { display: none; position: fixed; top: 56px; left: 0; right: 0; width: auto; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line-2); max-height: calc(100dvh - 56px); overflow-y: auto; }
  .gnb-search.is-open .search-panel { display: block; }
  .search-form { height: 44px; }
  .search-form input { font-size: 16px; }
  .search-close { display: inline-flex; height: 44px; padding: 0 12px; font-size: 13px; }
  .search-popup { position: static; width: 100%; max-height: none; border: 0; border-radius: 0; margin-top: 8px; }
}
