/* ==========================================================================
   다자녀 통행료 할인 가이드 — main.css
   가독성(체류시간) + 표·체크리스트 명확성 우선. 광고 영역은 본문과 분리.
   ========================================================================== */

:root {
  --navy: #123a6b;
  --navy-2: #1b4d8f;
  --blue: #2f6fd0;
  --blue-soft: #eaf1fc;
  --accent: #e8590c;
  --accent-soft: #fff2e8;
  --green: #0f7b52;
  --green-soft: #e7f6ef;
  --red: #c92a2a;
  --red-soft: #fdecec;
  --ink: #1a1d21;
  --ink-2: #3d434b;
  --ink-3: #6b737d;
  --line: #e3e7ec;
  --line-2: #eef1f5;
  --bg: #ffffff;
  --bg-2: #f6f8fb;
  --radius: 12px;
  --wrap: 1180px;
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic',
    'Noto Sans KR', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(1.6) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 62px; }

.brand { display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 800; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 20px; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 9px 13px; border-radius: 8px;
  color: var(--ink-2); font-size: 15px; font-weight: 600;
}
.site-nav a:hover { background: var(--bg-2); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--navy-2); }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink-2); border-radius: 2px; }

/* ------------------------------------------------------------------ layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
  padding-top: 24px;
  padding-bottom: 60px;
}
main { min-width: 0; }

/* --------------------------------------------------------------- crumb/meta */
.crumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; color: var(--ink-3); }
.crumb li + li::before { content: '›'; margin-right: 6px; color: #b6bec8; }
.crumb a { color: var(--ink-3); }
.crumb-cat { color: var(--ink-3); }
.crumb [aria-current="page"] { color: var(--ink-2); font-weight: 600; }

.post h1 {
  font-size: 32px; line-height: 1.35; letter-spacing: -.02em;
  margin: 4px 0 12px; color: var(--ink); font-weight: 800;
}
.meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ink-3); margin: 0 0 22px; }
.meta .dot { color: #c5ccd5; }

/* -------------------------------------------------------------- answer lead */
.answer-lead {
  background: linear-gradient(180deg, var(--blue-soft), #f4f8fe);
  border: 1px solid #cfe0f7; border-left: 5px solid var(--blue);
  border-radius: var(--radius); padding: 20px 22px; margin: 0 0 20px;
  font-size: 17.5px; line-height: 1.85; color: #16305a;
}
.answer-lead strong { color: var(--navy); font-weight: 800; }

.answer-box {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px; margin: 0 0 18px;
}
.answer-box .answer-label {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  color: var(--navy-2); background: var(--blue-soft);
  padding: 3px 9px; border-radius: 999px; margin-bottom: 8px;
}
.answer-box p { margin: 0; }

/* ---------------------------------------------------------------- keyfacts */
.keyfacts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 0 0 24px;
}
.keyfacts > div { background: #fff; padding: 14px 16px; }
.keyfacts dt { font-size: 12.5px; color: var(--ink-3); font-weight: 700; margin-bottom: 4px; }
.keyfacts dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--navy); line-height: 1.5; }

/* --------------------------------------------------------------------- toc */
.toc {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin: 0 0 30px; background: #fcfdff;
}
.toc-title { font-size: 15px; font-weight: 800; margin: 0 0 10px; color: var(--navy); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 5px 0; font-size: 15.5px; }
.toc a { color: var(--ink-2); }

/* -------------------------------------------------------------- sections */
.sec { margin: 0 0 38px; scroll-margin-top: 76px; }
.sec h2 {
  font-size: 24px; line-height: 1.45; letter-spacing: -.01em; font-weight: 800;
  margin: 44px 0 16px; padding-top: 8px; color: var(--ink);
  border-top: 3px solid var(--navy); display: inline-block;
}
.sec:first-of-type h2 { margin-top: 8px; }
.sec p { margin: 0 0 14px; }
.sec h3 { font-size: 19px; margin: 26px 0 10px; font-weight: 700; }

.list { margin: 0 0 16px; padding-left: 22px; }
.list li { margin: 7px 0; }

.ilink { color: var(--blue); font-weight: 600; border-bottom: 1px solid #bcd4f4; }
.ilink:hover { background: var(--blue-soft); text-decoration: none; }
.elink { color: var(--green); font-weight: 600; border-bottom: 1px solid #b7dfcd; }
.elink:hover { background: var(--green-soft); text-decoration: none; }
.ext-ico { font-size: 12px; margin-left: 2px; vertical-align: 1px; }

/* ------------------------------------------------------------------- table */
.table-wrap {
  overflow-x: auto; margin: 0 0 22px; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background:
    linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left / 28px 100% no-repeat,
    linear-gradient(90deg, rgba(255,255,255,0), #fff 70%) right / 28px 100% no-repeat,
    radial-gradient(farthest-side at 0 50%, rgba(18,58,107,.14), transparent) left / 12px 100% no-repeat,
    radial-gradient(farthest-side at 100% 50%, rgba(18,58,107,.14), transparent) right / 12px 100% no-repeat;
  background-attachment: local, local, scroll, scroll;
}
table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 460px; }
caption {
  caption-side: top; text-align: left; font-size: 13.5px; color: var(--ink-3);
  padding: 0 0 8px; font-weight: 600;
}
th, td { border: 1px solid var(--line); padding: 11px 13px; text-align: left; vertical-align: top; line-height: 1.65; }
thead th { background: var(--navy); color: #fff; font-weight: 700; border-color: var(--navy); white-space: nowrap; }
tbody th { background: var(--bg-2); font-weight: 700; color: var(--ink); }
tbody tr:nth-child(even) td { background: #fbfcfe; }

/* ---------------------------------------------------------------- callouts */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: 10px; padding: 15px 17px; margin: 0 0 20px;
  font-size: 16px; line-height: 1.75;
}
.callout p { margin: 0; }
.callout-ico {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; margin-top: 2px;
}
.note { background: var(--blue-soft); border: 1px solid #cfe0f7; }
.note .callout-ico { background: var(--blue); }
.warn { background: var(--red-soft); border: 1px solid #f6cfcf; }
.warn .callout-ico { background: var(--red); }
.tip { background: var(--green-soft); border: 1px solid #bfe5d3; }
.tip .callout-ico { background: var(--green); }
.verify { background: var(--accent-soft); border: 1px solid #f9d5bd; }
.verify .callout-ico { background: var(--accent); }

/* --------------------------------------------------------------- checklist */
.checklist {
  border: 2px solid var(--navy); border-radius: var(--radius);
  padding: 18px 20px; margin: 0 0 24px; background: #fff;
}
.checklist-title { font-weight: 800; color: var(--navy); margin: 0 0 12px; font-size: 16.5px; }
.checklist ul { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 11px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); }
.checklist li:first-child { border-top: 0; }
.chk {
  flex: none; width: 20px; height: 20px; margin-top: 3px;
  border: 2px solid var(--blue); border-radius: 5px; position: relative;
}
.chk::after {
  content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid var(--blue); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* ------------------------------------------------------------------- steps */
.steps { list-style: none; counter-reset: s; margin: 0 0 24px; padding: 0; }
.steps li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.steps li:last-child { border-bottom: 0; }
.step-no {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
}
.steps strong { display: block; font-size: 16.5px; margin-bottom: 4px; color: var(--navy); }
.steps p { margin: 0; font-size: 16px; color: var(--ink-2); }

/* --------------------------------------------------------------------- cta */
.cta { margin: 26px 0; text-align: center; }
.cta-btn {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 17px; padding: 15px 30px; border-radius: 10px;
  box-shadow: 0 3px 0 #c94f06;
}
.cta-btn:hover { background: #d9520b; text-decoration: none; transform: translateY(1px); box-shadow: 0 2px 0 #c94f06; }
.cta-sub { display: block; font-size: 13px; color: var(--ink-3); margin-top: 9px; }

/* ------------------------------------------------------------------ figure */
.fig { margin: 0 0 24px; text-align: center; }
.fig img { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; width: 100%; }
.fig figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

/* --------------------------------------------------------------------- faq */
.faq { margin: 46px 0 0; }
.faq h2 {
  font-size: 24px; font-weight: 800; margin: 0 0 16px;
  padding-top: 8px; border-top: 3px solid var(--navy); display: inline-block;
}
.faq-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); background: #fff; }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; padding: 16px 46px 16px 18px; font-weight: 700; font-size: 16.5px;
  position: relative; list-style: none; line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--blue); font-weight: 400; line-height: 1;
}
.faq details[open] summary { background: var(--bg-2); }
.faq details[open] summary::after { content: '−'; }
.faq-a { padding: 4px 18px 18px; color: var(--ink-2); }
.faq-a p { margin: 0; }

/* ----------------------------------------------------------------- related */
.related { margin: 46px 0 0; }
.related h2 { font-size: 21px; font-weight: 800; margin: 0 0 14px; }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
.card {
  display: flex; flex-direction: column; gap: 5px; height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff;
}
.card:hover { border-color: var(--blue); background: #fbfdff; text-decoration: none; }
.card-cat { font-size: 12px; font-weight: 700; color: var(--blue); }
.card-title { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.card-go { font-size: 13px; color: var(--ink-3); margin-top: auto; }

.page-note {
  margin: 40px 0 0; padding: 14px 16px; background: var(--bg-2);
  border-radius: 10px; font-size: 13.5px; color: var(--ink-3); line-height: 1.7;
}

/* ----------------------------------------------------------------- sidebar */
.sidebar { position: relative; }
.side-sticky { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }
.side-h { font-size: 14px; font-weight: 800; color: var(--navy); margin: 0 0 10px; }
.side-toc, .side-links { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fcfdff; }
.side-toc ol { margin: 0; padding-left: 18px; }
.side-toc li, .side-links li { font-size: 14px; margin: 6px 0; line-height: 1.55; }
.side-toc a, .side-links a { color: var(--ink-2); }
.side-links ul { list-style: none; margin: 0; padding: 0; }
.side-links li { padding-left: 12px; position: relative; }
.side-links li::before { content: '·'; position: absolute; left: 2px; color: var(--blue); }

/* --------------------------------------------------------------------- ads */
.ad { margin: 28px 0; display: block; text-align: center; }
.ad-leaderboard { margin: 22px 0 30px; }
.ad-sidebar { margin: 0; }
.ad-ph {
  border: 1px dashed #cfd6df; border-radius: 10px; background: #fafbfd;
  display: grid; place-items: center; gap: 3px; color: #98a2b0; padding: 20px;
}
.ad-leaderboard .ad-ph { min-height: 100px; }
.ad-in-article .ad-ph { min-height: 250px; }
.ad-multiplex .ad-ph { min-height: 280px; }
.ad-sidebar .ad-ph { min-height: 600px; }
.ad-ph span { font-size: 13px; font-weight: 700; }
.ad-ph small { font-size: 11.5px; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: #0f2c50; color: #c3d2e6; padding: 44px 0 30px; margin-top: 20px; font-size: 14.5px; }
.site-footer a { color: #c3d2e6; }
.site-footer a:hover { color: #fff; }
.foot-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.foot-h { font-size: 14px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; line-height: 1.55; }
.foot-official { margin-top: 28px; padding-top: 22px; border-top: 1px solid #23456f; }
.disclaimer {
  margin: 24px 0 0; padding: 14px 16px; background: #0b2340; border-radius: 8px;
  font-size: 13px; color: #9fb3cd; line-height: 1.7;
}
.copyright { margin: 16px 0 0; font-size: 13px; color: #7f95b3; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .sidebar { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 62px;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .07);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 11px 12px; font-size: 16px; }

  .post h1 { font-size: 25px; }
  .sec h2 { font-size: 21px; margin-top: 36px; }
  .faq h2, .related h2 { font-size: 20px; }
  .answer-lead { font-size: 16.5px; padding: 17px 18px; }
  .keyfacts { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .foot-nav { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  table { font-size: 14.5px; }
  th, td { padding: 9px 10px; }
  .cta-btn { display: block; font-size: 16px; padding: 15px 18px; }
}

@media print {
  .site-header, .sidebar, .ad, .cta, .site-footer, .toc { display: none !important; }
}
