/* 모빌랩스: 자동차 매체 표준형. 색·간격·글자 규칙은 DESIGN.md 참고. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f6f5;
  --text: #15181a;
  --text-2: #454c52;
  --text-3: #676e74;
  --line: #e2e6e4;
  --line-strong: #15181a;
  --accent: #0b6b47;
  --on-accent: #ffffff;
  --shade: rgb(21 24 26 / 0.12);
  --radius: 6px;
  --wrap: 1120px;
  --gutter: 20px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1211;
    --surface: #181c1b;
    --text: #e9eceb;
    --text-2: #b9bfbc;
    --text-3: #8f9693;
    --line: #272c2a;
    --line-strong: #e9eceb;
    --accent: #5fcf9f;
    --on-accent: #0f1211;
    --shade: rgb(0 0 0 / 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color 0.15s ease-out, text-decoration-color 0.15s ease-out;
}

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
}
.skip:focus { top: 8px; }

/* 머리띠 */
.site-header { border-bottom: 1px solid var(--line-strong); }

.header-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 56px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.wm-b { color: var(--accent); }

.site-nav { display: flex; margin-right: -10px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -3px 0 var(--accent);
}

/* 틀 */
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  padding-block: 28px 72px;
}
.page-single { max-width: 760px; padding-block: 28px 72px; }

/* 글 목록 */
.lead { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.lead-title {
  margin: 0 0 12px;
  font-size: 27px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.lead-desc {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.65;
  text-wrap: pretty;
}

.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { padding-block: 22px; border-bottom: 1px solid var(--line); }
.post-title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.42;
  font-weight: 700;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.post-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.6;
}
.lead-title a:hover, .post-title a:hover, .side-list a:hover, .toc a:hover { text-decoration: underline; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.meta a { color: var(--accent); font-weight: 600; }
.meta a:hover { text-decoration: underline; }

.list-head { padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); }
.list-h1 {
  margin: 0 0 6px;
  font-size: 27px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.028em;
}
.list-desc { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.6; }

.post-list.compact .post-item { padding-block: 16px; }
.post-list.compact .post-title { font-size: 17px; }
.post-list.compact .post-desc { display: none; }

/* 옆 칸 */
.side-box + .side-box { margin-top: 40px; }
.side-title {
  margin: 0 0 6px;
  padding-top: 12px;
  border-top: 2px solid var(--line-strong);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}
.cat-list, .side-list, .toc ol { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: block; padding-block: 12px; border-bottom: 1px solid var(--line); }
.cat-list strong { display: block; font-size: 16px; font-weight: 700; line-height: 1.5; }
.cat-list span { display: block; color: var(--text-3); font-size: 14px; line-height: 1.55; text-wrap: pretty; }
.cat-list a:hover strong { color: var(--accent); }
.side-text { margin: 8px 0 10px; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.more { color: var(--accent); font-size: 14.5px; font-weight: 600; }
.more:hover { text-decoration: underline; }
.side-list a { display: block; padding-block: 11px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; font-weight: 500; }
.toc a { display: block; padding-block: 7px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.toc a:hover { color: var(--text); }

/* 글 본문 화면 */
.crumb { display: flex; gap: 8px; color: var(--text-3); font-size: 14px; line-height: 1.5; }
.crumb a { margin: -8px -4px; padding: 8px 4px; }
.crumb a:hover { text-decoration: underline; }
.crumb-cat { color: var(--accent); font-weight: 600; }

.post-h1 {
  margin: 10px 0 14px;
  font-size: 27px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.post-meta { gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

.summary {
  margin: 24px 0 30px;
  padding: 18px 20px 20px;
  border-radius: var(--radius);
  background: var(--surface);
}
.summary h2 { margin: 0 0 8px; font-size: 15px; line-height: 1.5; font-weight: 700; }
.summary ul { margin: 0; padding-left: 18px; }
.summary li { font-size: 16px; line-height: 1.62; text-wrap: pretty; }
.summary li + li { margin-top: 6px; }
.summary li::marker { color: var(--accent); }

.toc-inline { margin: -8px 0 30px; border-block: 1px solid var(--line); }
.toc-inline summary { padding-block: 13px; font-size: 15px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.toc-inline summary::marker { color: var(--text-3); }
.toc-inline ol { list-style: none; margin: 0; padding: 0 0 10px; }
.toc-inline a { display: block; padding-block: 8px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.toc-inline a:hover { color: var(--text); text-decoration: underline; }

.prose { font-size: 17px; line-height: 1.78; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; text-wrap: pretty; }
.prose h2 {
  margin: 52px 0 14px;
  font-size: 22px;
  line-height: 1.38;
  font-weight: 700;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.prose h3 {
  margin: 34px 0 10px;
  font-size: 18.5px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.018em;
}
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 21px; }
.prose li { margin-block: 6px; }
.prose li::marker { color: var(--text-3); }
.prose strong { font-weight: 700; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose a:hover { text-decoration-thickness: 2.5px; }

.callout {
  margin: 22px 0 26px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.65;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

/* 표 */
.table-wrap {
  margin: 20px 0 28px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-3) transparent;
  /* 옆으로 넘칠 때만 오른쪽 끝에 옅은 그늘이 보인다 */
  background:
    linear-gradient(to left, var(--bg) 40%, transparent) right / 36px 100% no-repeat local,
    linear-gradient(to left, var(--shade), transparent) right / 16px 100% no-repeat scroll;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.table-wrap caption {
  caption-side: top;
  padding-bottom: 6px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.table-wrap th, .table-wrap td { padding: 10px 24px 10px 0; text-align: left; vertical-align: top; }
.table-wrap [style*="right"] + :not([style*="right"]) { padding-left: 12px; }
.table-wrap td { text-wrap: pretty; }
.table-wrap table.t-wide th:first-child, .table-wrap table.t-wide td:first-child {
  position: sticky;
  left: 0;
  background: var(--bg);
}
.table-wrap th:last-child, .table-wrap td:last-child { padding-right: 0; }
.table-wrap thead th {
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.table-wrap td { border-bottom: 1px solid var(--line); }
.table-wrap td[style*="right"], .table-wrap th[style*="right"] { white-space: nowrap; }
.table-wrap td:first-child { font-weight: 600; }

/* 사실의 단계 표시: 확정은 채움, 정부안은 실선 테두리, 보도·전망은 점선 테두리 */
.st {
  display: inline-block;
  margin-right: 6px;
  padding: 3px 7px 4px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: 1.5px;
}
.st-fixed { background: var(--accent); color: var(--on-accent); }
.st-plan { color: var(--accent); }
.st-talk { border-style: dashed; border-color: var(--text-3); color: var(--text-2); }
.prose p > .st:not(:first-child) { margin-right: 2px; }
.summary .st { vertical-align: 1px; }
.ph { display: inline-block; }

/* 출처·이어 읽기 */
.sources { margin-top: 56px; }
.sources h2 { margin: 0 0 10px; font-size: 20px; line-height: 1.4; font-weight: 700; letter-spacing: -0.02em; }
.sources ol { margin: 0; padding-left: 21px; }
.sources li { margin-block: 7px; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.sources li::marker { color: var(--text-3); }
.sources a { text-decoration: underline; text-decoration-color: var(--text-3); overflow-wrap: anywhere; }
.sources a:hover { text-decoration-color: currentColor; }
.sources span { color: var(--text-3); white-space: nowrap; }
.note { margin: 18px 0 0; color: var(--text-3); font-size: 14px; line-height: 1.65; }

.related { margin-top: 52px; }

.ad { margin-block: 36px; text-align: center; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }

/* 바닥 */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 44px; color: var(--text-3); font-size: 14px; line-height: 1.6; }
.footer-row { display: grid; gap: 14px; }
.footer-about { margin: 0; }
.footer-about strong { margin-right: 8px; color: var(--text); font-weight: 700; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-nav a { padding-block: 6px; color: var(--text-2); font-weight: 500; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }
.footer-copy { margin: 0; font-variant-numeric: tabular-nums; }

@media (max-width: 719px) {
  .table-wrap table { font-size: 14.5px; }
  .table-wrap th, .table-wrap td { padding-right: 16px; }
}

@media (max-width: 399px) {
  .table-wrap table { font-size: 14px; }
  .table-wrap th, .table-wrap td { padding-right: 12px; }
}

@media (max-width: 1023px) {
  /* 휴대폰 글 화면: 옆 칸은 숨기고, 목차는 요약 아래 접이식으로 보여 준다 */
  .page-grid:has(> .post) > .side-col { display: none; }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .lead-title { font-size: 34px; }
  .post-h1, .list-h1 { font-size: 34px; }
  .post-title { font-size: 22px; }
  .prose { font-size: 18px; line-height: 1.8; }
  .prose h2 { font-size: 25px; }
  .prose h3 { font-size: 20px; }
  .table-wrap table { font-size: 15.5px; }
}

@media (min-width: 1024px) {
  .header-row { height: 64px; }
  .wordmark { font-size: 23px; }
  .site-nav a { padding-inline: 16px; font-size: 16.5px; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; padding-block: 44px 96px; }
  .page-single { padding-block: 44px 96px; }
  .lead-title { font-size: 38px; }
  .post-h1 { font-size: 38px; }
  .side-sticky { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; }
  .toc-inline { display: none; }
  .footer-row { grid-template-columns: 1fr auto; align-items: center; }
  .footer-copy { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}
