:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --ink: #15302c;
  --muted: #5e726e;
  --line: #d3deda;
  --route: #0e7c6b;
  --route-soft: #dcefea;
  --stem: #e3a21a;
  --stem-soft: #fbefd2;
  --stem-ink: #6b4a00;
  --warn: #fff4d6;
  --font: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1b19; --surface: #15241f; --ink: #e6efec; --muted: #9db1ac; --line: #2a3d38;
    --route: #3cc2a8; --route-soft: #17352f; --stem: #f2b640; --stem-soft: #3a2e10; --stem-ink: #f7d68a;
    --warn: #3a2e10; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1b19; --surface: #15241f; --ink: #e6efec; --muted: #9db1ac; --line: #2a3d38;
  --route: #3cc2a8; --route-soft: #17352f; --stem: #f2b640; --stem-soft: #3a2e10; --stem-ink: #f7d68a;
  --warn: #3a2e10; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.7;
  overflow-wrap: break-word;
}
a { color: var(--route); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--stem); outline-offset: 2px; border-radius: 4px; }

main, .masthead, .foot { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
main > section, main > aside, main > ol { margin-block: 56px; }

.sample-bar { background: var(--warn); color: var(--ink); text-align: center; padding: 8px 16px; font-size: 14px; }

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand svg { fill: var(--route); stroke: var(--route); stroke-width: 2; }
.masthead nav { display: flex; gap: 20px; font-size: 15px; }
.masthead nav a { color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); }

h1, h2 { letter-spacing: -0.025em; line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 800; margin: 0 0 20px; max-width: 18em; }
h2 { font-size: 1.4rem; font-weight: 750; margin: 0 0 8px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 36em; margin: 0; }
.hint { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; max-width: 46em; }
.note { background: var(--stem-soft); color: var(--stem-ink); padding: 10px 14px; border-radius: 8px; display: inline-block; margin-top: 16px; font-size: 15px; }
.en, .en-title { color: var(--muted); font-weight: 400; }
.en { display: block; font-size: 13px; }
.en-title { margin: -8px 0 16px; font-size: 15px; }
.hero { margin-top: 40px !important; }
.crumbs { margin-top: 24px; font-size: 14px; }

/* 경로(route): 이 사이트의 시그니처 요소 ------------------------------ */
.route {
  --dot: 18px;
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  position: relative; counter-reset: stop;
}
.route::before {
  content: ""; position: absolute; left: calc(var(--dot) / 2); right: 12%;
  top: calc(var(--dot) / 2 - 2px); height: 4px; background: var(--route); border-radius: 2px;
}
.route li { position: relative; padding-right: 20px; display: flex; flex-direction: column; }
.route .dot {
  width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--surface); border: 4px solid var(--route); position: relative; z-index: 1;
  margin-bottom: 18px;
}
.route li:last-child .dot { background: var(--route); }
.route b { color: var(--route); font-size: 15px; font-weight: 700; }
.route .fig {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; line-height: 1.15; margin: 4px 0 8px;
}
.route small { color: var(--muted); font-size: 14px; line-height: 1.55; }
.route li.is-stem .dot { border-color: var(--stem); }
.route li.is-stem b { color: var(--stem-ink); }
.route li.is-stem .fig { background: linear-gradient(transparent 62%, var(--stem-soft) 62%); width: fit-content; }
.route--intro { margin-top: 40px; max-width: 760px; }
.route--intro b { font-size: 1.25rem; color: var(--ink); }

@media (max-width: 720px) {
  .route { grid-template-columns: 1fr; gap: 28px; padding-left: 36px; }
  .route::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 4px; height: auto; }
  .route .dot { position: absolute; left: -36px; top: 4px; margin: 0; }
  .route li { padding-right: 0; }
}

/* 표 ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15.5px; }
th, td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th[scope="row"], thead th:first-child { text-align: left; white-space: normal; }
.table-wrap th[scope="row"] { min-width: 9.5em; }
@media (max-width: 560px) {
  th, td { padding: 10px 12px; font-size: 14.5px; }
  .masthead { flex-wrap: wrap; row-gap: 4px; }
  .masthead nav { gap: 14px; font-size: 14px; }
}
thead th { font-size: 13.5px; font-weight: 600; color: var(--muted); background: var(--surface); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }
.compare tbody th a { font-weight: 700; text-decoration: none; }
.compare tbody th a:hover { text-decoration: underline; }
.compare thead th { cursor: pointer; user-select: none; }
.compare thead th[aria-sort="descending"]::after { content: " ▾"; }
.compare thead th[aria-sort="ascending"]::after { content: " ▴"; }
.opt { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--route-soft); color: var(--route); }
.opt--stem { background: var(--stem-soft); color: var(--stem-ink); }

.rank { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* 주별 막대 ----------------------------------------------------------- */
.bars { list-style: none; padding: 0; margin: 16px 0 0; max-width: 640px; }
.bars li { display: grid; grid-template-columns: 7.5em 1fr 5.5em; align-items: center; gap: 12px; padding: 6px 0; font-size: 15px; }
.bars .bar { height: 12px; border-radius: 6px; background: var(--route); width: var(--w); }
.bars .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 탭 ---------------------------------------------------------------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--route-soft); border-radius: 10px; margin-bottom: 12px; }
.tabs button { font: inherit; font-size: 15px; border: 0; padding: 6px 18px; border-radius: 7px; background: transparent; color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); font-weight: 700; }

/* 기타 --------------------------------------------------------------- */
.consult { background: var(--route); color: #fff; border-radius: 16px; padding: 32px; }
.consult p { opacity: 0.9; max-width: 36em; }
.btn { display: inline-block; background: var(--surface); color: var(--route); font-weight: 700; padding: 12px 22px; border-radius: 10px; text-decoration: none; }
.hero .btn { background: var(--route); color: #fff; }
.others ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.prose { max-width: 40em; }
.prose h2 { margin-top: 36px; font-size: 1.2rem; }
.ad { min-height: 100px; }
.foot { color: var(--muted); font-size: 13.5px; padding-block: 40px 56px; border-top: 1px solid var(--line); margin-top: 72px; }
.foot p { margin: 0 0 6px; max-width: 52em; }

@media (prefers-reduced-motion: no-preference) {
  .route:not(.route--intro)::before { transform-origin: left; animation: draw 0.9s ease-out both; }
  @keyframes draw { from { transform: scaleX(0); } }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
  .route:not(.route--intro)::before { transform-origin: top; animation-name: drawv; }
  @keyframes drawv { from { transform: scaleY(0); } }
}

/* 이번 달 대기 순번 ------------------------------------------------------ */
.vb-now { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 16px; }
.vb-now p { margin: 0; }
.vb-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.vb-cards > div { display: flex; flex-direction: column; min-width: 0; }
.vb-cards b { color: var(--route); font-size: 15px; }
.vb-cards .fig { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.vb-cards small { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .vb-cards { grid-template-columns: 1fr; } }

/* 직종 목록 --------------------------------------------------------------- */
.group-h { font-size: 1rem; font-weight: 700; color: var(--muted); margin: 28px 0 10px; }
.job-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.job-grid a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline;
  padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; height: 100%;
}
.job-grid a:hover { border-color: var(--route); }
.job-name { grid-column: 1 / -1; font-weight: 700; font-size: 1.05rem; }
.job-stat { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.job-stat em { font-style: normal; color: var(--ink); font-weight: 650; font-size: 15px; }
.job-stat:last-child { text-align: right; }
.cta-line { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; color: var(--muted); font-size: 15px; }
.cta-line .btn { background: var(--route); color: #fff; }

/* 취업이민 경로(5단계) ----------------------------------------------------- */
.route--five { grid-template-columns: repeat(5, 1fr); }
.route--five::before { right: 10%; }
.route .fig--text { font-size: clamp(1.15rem, 2.2vw, 1.45rem); letter-spacing: -0.02em; margin-top: 8px; }
@media (max-width: 720px) { .route--five { grid-template-columns: 1fr; } }
.korea-line { background: var(--route-soft); border-radius: 10px; padding: 12px 16px; margin: -24px 0 0; font-size: 15.5px; }

.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.kv div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { margin: 0; font-weight: 750; font-size: 1.25rem; font-variant-numeric: tabular-nums; }

.caution { border-left: 4px solid var(--stem); background: var(--stem-soft); padding: 20px 24px; border-radius: 0 12px 12px 0; }
.caution h2 { font-size: 1.15rem; color: var(--stem-ink); }
.caution ul { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* 회사 검색 --------------------------------------------------------------- */
.search-label { display: block; font-weight: 700; margin-bottom: 6px; }
.search input {
  width: 100%; max-width: 520px; font: inherit; font-size: 1.1rem; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--route); }
td.wrap { white-space: normal; text-align: left; min-width: 10em; }
.rate { color: var(--muted); font-size: 13px; }
.foot a { color: var(--muted); }
th.left { text-align: left; }

/* Global layout additions ---------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.masthead { flex-wrap: wrap; row-gap: 8px; }
.masthead nav.countries { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.masthead nav.countries a[aria-current="page"] { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-color: var(--route); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.subnav {
  max-width: 1040px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 6px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.subnav a { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--route-soft); color: var(--route); text-decoration: none; font-weight: 600; }
.subnav a:hover { background: var(--route); color: #fff; }

.country-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.country-grid a {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.country-grid a:hover { border-color: var(--route); }
.c-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.c-what { color: var(--muted); font-size: 15px; flex: 1; }
.c-tag { align-self: flex-start; font-size: 13px; font-weight: 650; padding: 2px 10px; border-radius: 999px; background: var(--route-soft); color: var(--route); }
.c-tag--plain { background: var(--stem-soft); color: var(--stem-ink); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-block: 32px; }
.stat-row > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; }
.stat-row b { color: var(--route); font-size: 14px; }
.stat-row .fig { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.facts b { color: var(--route); font-size: 14px; }
.facts .fig { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.facts small { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.facts small a { color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; max-width: 46em; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 6px; border-left: 2.5px solid var(--route); border-bottom: 2.5px solid var(--route); transform: rotate(-45deg); }

.elsewhere { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; }
.elsewhere h2 { font-size: 1.15rem; }
.elsewhere p { margin: 0 0 10px; max-width: 46em; }
.bars .bar--alt { background: var(--stem); }
.bars li.bars-wide { grid-template-columns: 12em 1fr 4.5em; }
@media (max-width: 560px) { .bars li, .bars li.bars-wide { grid-template-columns: 1fr 4.5em; } .bars .label { grid-column: 1 / -1; } }

/* Two-line pathways -------------------------------------------------------- */
.route--n { grid-template-columns: repeat(var(--n, 5), 1fr); }
.route--n::before { right: calc(100% / var(--n, 5) - 8px); }
@media (max-width: 720px) { .route--n { grid-template-columns: 1fr; } .route--n::before { right: auto; } }
.paths { display: grid; gap: 28px; }
.path { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px 8px; }
.path-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.path-head h3 { margin: 0; font-size: 1.15rem; font-weight: 750; }
.path-tag { font-size: 13px; font-weight: 650; padding: 2px 10px; border-radius: 999px; background: var(--route-soft); color: var(--route); }
.path--trade .path-tag { background: var(--stem-soft); color: var(--stem-ink); }
.path--trade .route::before { background: var(--stem); }
.path--trade .route .dot { border-color: var(--stem); }
.path--trade .route li:last-child .dot { background: var(--stem); }
.path--trade .route b { color: var(--stem-ink); }
.path > p { color: var(--muted); margin: 8px 0 0; max-width: 46em; }
.path .route { margin-block: 22px 12px; }
.path .route .fig--text { font-size: 1.05rem; margin-top: 4px; }
.path-src { font-size: 13px; color: var(--muted); }
.path-src a { color: var(--muted); }
.country-block { margin-block: 48px; }
.country-block > h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.country-block > h2 a { font-size: 15px; font-weight: 500; }
.stat-row .fig--small { font-size: 1.3rem; }

/* Korean edition ------------------------------------------------------------ */
:lang(ko) body, body:lang(ko) { font-family: "Public Sans", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; word-break: keep-all; }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; }
.korea-line { background: var(--route-soft); border-radius: 10px; padding: 12px 16px; font-size: 15.5px; }

/* Visa types tabs ------------------------------------------------------------ */
.visas { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; display: grid; gap: 18px; }
.visa-picker { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.visa-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.visa-cat { font-size: 13px; font-weight: 650; color: var(--muted); }
.visa-cat--pr { color: var(--route); }
.visa-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.visa-btns button {
  font: inherit; font-size: 14.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
}
.visa-btns button:hover { border-color: var(--route); }
.visa-btns button[aria-selected="true"] { background: var(--route); border-color: var(--route); color: #fff; }
.visa-panel h3 { margin: 0 0 12px; font-size: 1.2rem; font-weight: 750; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.visa-code { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 6px; background: var(--route-soft); color: var(--route); }
.visa-req { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.visa-row { border-top: 1px solid var(--line); padding-top: 10px; min-width: 0; }
.visa-row dt { font-size: 13px; font-weight: 650; color: var(--muted); }
.visa-row dd { margin: 2px 0 0; font-size: 15.5px; }
.visa-row--language dd, .visa-row--education dd, .visa-row--experience dd { font-weight: 600; }
@media (max-width: 640px) { .visa-req { grid-template-columns: 1fr; } .visas { padding: 18px 16px; } }
