/* 창업의길 공통 모양(apps/startup-programs 와 같음) + 아래쪽 상권 전용(표·막대). */
@font-face {
  font-family: "Pretendard";
  src: url("/fonts/pretendard.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --bg: #f6f7f4;
  --paper: #ffffff;
  --fg: #1c2420;
  --muted: #5b6861;
  --line: #d8ded9;
  --accent: #1f6b4f;
  --accent-soft: #e4efe9;
  --urgent: #a63d1f;
  --urgent-soft: #f8e7e1;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131916;
    --paper: #1a221f;
    --fg: #e5ece7;
    --muted: #9ca9a2;
    --line: #2e3934;
    --accent: #72c7a1;
    --accent-soft: #1e3229;
    --urgent: #f08f6f;
    --urgent-soft: #3a2119;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 var(--sans);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(24px, 4.6vw, 34px); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.inner {
  width: 100%;
  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));
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 6px 10px; z-index: 5; }

.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top .inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--fg); text-decoration: none; font-size: 17px; }
.mark { width: 30px; height: 30px; flex: none; color: var(--accent); }
.name { display: flex; align-items: baseline; gap: 6px; }
.name b { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.name small { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; padding-block: 4px; }
.top nav a[aria-current="page"], .top nav a:hover { color: var(--fg); box-shadow: inset 0 -2px var(--accent); }

main.inner { display: grid; gap: 36px; padding-block: 24px 64px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }

.lead { display: grid; gap: 12px; max-width: 760px; }
.lead p { color: var(--muted); font-size: 17px; }
.answer {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  border-radius: 0 6px 6px 0;
  font-size: 17px;
  max-width: 820px;
}
.meta-line { font-size: 13px; color: var(--muted); }

.stats { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.stats div b { display: block; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stats div span { font-size: 14px; color: var(--muted); }

.block { display: grid; gap: 14px; }
.block > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.block > header a { font-size: 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tile {
  display: grid; gap: 2px; padding: 14px 16px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px; color: var(--fg); text-decoration: none;
}
.tile:hover { border-color: var(--accent); }
.tile b { font-size: 16px; }
.tile span { font-size: 13px; color: var(--muted); }
.tile .n { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }

.list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a.row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 14px; padding: 12px 16px; color: var(--fg); text-decoration: none; }
.list a.row:hover { background: var(--accent-soft); }
.due { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 2px; }
.due.soon { color: var(--urgent); }
.row .t { font-weight: 600; line-height: 1.45; }
.row .s { grid-column: 2; font-size: 13px; color: var(--muted); }
@media (max-width: 520px) {
  .list a.row { grid-template-columns: 1fr; }
  .row .s { grid-column: 1; }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 600; text-decoration: none; }
.chip.urgent { background: var(--urgent-soft); color: var(--urgent); }

.facts { display: grid; grid-template-columns: 140px minmax(0, 1fr); margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.facts dt, .facts dd { padding: 11px 16px; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--muted); font-size: 14px; background: var(--bg); }
.facts dd { white-space: pre-line; min-width: 0; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
}
.prose { display: grid; gap: 12px; max-width: 720px; }
.prose p, .prose li { color: var(--fg); }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.note { font-size: 14px; color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: 8px; padding: 12px 14px; }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--paper); font-weight: 700; text-decoration: none; }
.btn.ghost { background: var(--paper); color: var(--accent); border: 1px solid var(--accent); }

.search { display: grid; gap: 10px; }
.search form { display: flex; flex-wrap: wrap; gap: 8px; }
.search input, .search select {
  font: inherit; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--fg);
}
.search input { flex: 1 1 260px; min-width: 0; }
.search select { flex: 0 1 auto; }

.foot { border-top: 1px solid var(--line); background: var(--paper); }
.foot .inner { display: grid; gap: 6px; padding-block: 24px 40px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); }

/* 상권 전용: 표·막대 */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.tbl table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl td a { font-weight: 600; text-decoration: none; }
.bar { width: 120px; height: 8px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 520px) { .bar { width: 64px; } .tbl th, .tbl td { padding: 8px 10px; } }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cols > * { min-width: 0; }

/* 좁은 화면에서 표·긴 글이 쪽 너비를 밀어내지 않게: 그리드 자식은 줄어들 수 있어야 한다 */
main.inner > *, .block, .block > *, .lead, .cols > *, .tiles > * { min-width: 0; }
html, body { overflow-x: hidden; }

/* 창업의길 네 사이트 공통: 쪽 끝 다음 단계 + 휴대폰 아래 이동 줄 */
.nextsteps { display: grid; gap: 12px; padding-block: 8px 28px; }
.nextsteps h2 { font-size: 18px; }
.nextgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.nextgrid a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 64px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); text-decoration: none; }
.nextgrid a:hover { border-color: var(--accent); }
.nextgrid svg { width: 26px; height: 26px; color: var(--accent); }
.nextgrid b { display: block; font-size: 16px; }
.nextgrid small { display: block; font-size: 13px; color: var(--muted); }
.dock { display: none; }
@media (max-width: 720px) {
  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border-top: 1px solid var(--line);
    padding: 2px max(8px, env(safe-area-inset-right, 0px)) calc(2px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); box-shadow: 0 -2px 10px rgba(0,0,0,.05); }
  .dock a { display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 54px; font-size: 12px; color: var(--muted); text-decoration: none; }
  .dock a[aria-current="page"] { color: var(--accent); font-weight: 800; }
  .dock svg { width: 22px; height: 22px; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
}

/* 가이드: 6단계 · 3줄 요약 · 목차 · 출처 상자 */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 820px; }
.steps a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); text-decoration: none; }
.steps a:hover { border-color: var(--accent); }
.steps i { font-style: normal; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--paper); font-weight: 800; }
.steps b { display: block; font-size: 16px; }
.steps small { display: block; font-size: 14px; color: var(--muted); }
.steps em { font-style: normal; font-size: 13px; color: var(--accent); font-weight: 700; white-space: nowrap; }
.sum3, .toc, .srcbox { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; max-width: 820px; display: grid; gap: 8px; }
.sum3 h2, .toc h2 { font-size: 16px; margin: 0; }
.sum3 ol, .toc ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-size: 15px; }
.sum3 { border-left: 4px solid var(--accent); }
.toc a { color: var(--fg); }
.srcbox { border-left: 4px solid var(--accent); }
.due.topic { display: inline-block; justify-self: start; font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 99px; background: var(--accent-soft, #e3efe8); color: var(--accent); }
/* 예약 글(tools/posts) */
.post { display: grid; gap: 20px; max-width: 820px; }
.post-head h1 { margin-bottom: 6px; }
.post-body h2 { margin-top: 28px; }
.post-body h3 { margin-top: 18px; font-size: 17px; }
.post-body p, .post-body li { font-size: 16px; line-height: 1.8; }
.post-body blockquote { margin: 0; padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--paper); border-radius: 0 10px 10px 0; }
.post-exp { background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; }
.post-exp h2 { font-size: 16px; margin: 0 0 6px; }
