/* =============================================================================
 * 개인회생 계산기 스위트 — 디자인 시스템
 * 딥네이비 + 금융블루, radius 18px, 회복 색상 --hope(세이지 그린)
 * ⚠️ 이 카테고리에서는 코랄핑크 계열(--warm) 사용 금지
 * 모바일 우선 · 외부 폰트/스크립트 의존 없음
 * ========================================================================== */

:root {
  --navy: #0F1B2D;
  --blue: #1D4ED8;
  --blue-ink: #1740B0;
  --blue-soft: #EEF3FF;
  --hope: #5E9A5D;          /* 세이지 그린 (본문 대비 확보용 조정) */
  --hope-bright: #7FB77E;   /* 기획서 원안 톤 — 그래프·배지 배경용 */
  --hope-soft: #EDF5EC;
  --amber: #8A6100;
  --amber-soft: #FFF6E3;
  --alert: #9B4A3C;         /* 경고는 붉은 경보 대신 차분한 벽돌톤 */
  --alert-soft: #FBEFEC;

  --bg: #F4F6FA;
  --card: #FFFFFF;
  --card-alt: #FAFBFD;
  --ink: #0F1B2D;
  --ink-2: #33415A;
  --muted: #647289;
  --line: #E2E8F2;
  --line-strong: #CBD5E5;

  --r: 18px;
  --r-sm: 12px;
  --r-xs: 8px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 24px rgba(15, 27, 45, .06);
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
  --maxw: 680px;
  --maxw-wide: 1160px;     /* 블로그형 레이아웃(본문 + 사이드바)·상단바·푸터 */
  --tap: 48px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #6D9BFF;
    --blue-ink: #A9C4FF;
    --blue-soft: #16233A;
    --hope: #8FC98D;
    --hope-bright: #7FB77E;
    --hope-soft: #16261A;
    --amber: #E4B45A;
    --amber-soft: #2A2314;
    --alert: #E39685;
    --alert-soft: #2C1C18;

    --bg: #0A111E;
    --card: #121C2C;
    --card-alt: #16212F;
    --ink: #E8EEF8;
    --ink-2: #C2CDDE;
    --muted: #93A2B8;
    --line: #223047;
    --line-strong: #2E3F5A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

/* ── 리셋 ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
    'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.35; margin: 0; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding-left: 1.15em; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ── 레이아웃 ─────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 40px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 10px; }

/* ── 상단바 ───────────────────────────────────────────────────── */
.topbar {
  background: var(--navy);
  color: #fff;
  position: sticky; top: 0; z-index: 40;
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 56px; }
.topbar a { color: #fff; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; opacity: .9; }
.brand .leaf { font-size: 18px; }
.topbar nav { margin-left: auto; display: flex; gap: 4px; }
.topbar nav a {
  font-size: 14px; padding: 8px 10px; border-radius: 999px; color: #D6E0F0;
  min-height: 36px; display: inline-flex; align-items: center;
}
.topbar nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }

/* 법률 면책 배지 (상단 고정) */
.disclaimer {
  background: var(--blue-soft);
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}
.disclaimer .wrap { padding-top: 10px; padding-bottom: 10px; display: flex; gap: 8px; }
.disclaimer b { color: var(--ink); font-weight: 600; }

/* ── 페이지 헤더 ──────────────────────────────────────────────── */
.page-head { padding: 24px 0 8px; }
.page-head h1 { font-size: 26px; }
.page-head .lead { color: var(--muted); font-size: 15px; margin-top: 8px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--hope);
  background: var(--hope-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 14px; }
.breadcrumb a { color: var(--muted); }

/* ── 카드 ─────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}
.card > h2, .card > h3 { font-size: 17px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.card-sub { color: var(--muted); font-size: 14px; }
.card.flat { box-shadow: none; background: var(--card-alt); }
.card.tight { padding: 16px 14px; }

/* ── 폼 ───────────────────────────────────────────────────────── */
.field { display: block; }
.field + .field { margin-top: 18px; }
.field > label, .field-label {
  display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; color: var(--ink);
}
.field .req { color: var(--blue); font-size: 13px; margin-left: 2px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 6px; }
.hint.echo { color: var(--blue-ink); font-weight: 600; }
.hint.error { color: var(--alert); font-weight: 600; }

input[type="text"], input[type="number"], input[type="date"], input[type="month"], select {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  font-size: 16px;               /* 16px 미만이면 iOS에서 자동 확대됨 */
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); outline: none; }
input::placeholder { color: #9AA7BC; }
input[type="date"], input[type="month"] { appearance: none; }

/* 금액 입력 */
.money { position: relative; display: flex; align-items: center; }
.money input {
  padding-right: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -.01em;
}
.money .unit {
  position: absolute; right: 14px; color: var(--muted); font-size: 15px; pointer-events: none;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  min-height: 36px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--card-alt); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip:active { transform: scale(.97); }

/* 세그먼트 컨트롤 (모바일 탭 최적화) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.seg.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.seg.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: var(--tap); padding: 10px 12px;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  cursor: pointer; transition: all .15s; line-height: 1.3;
}
.seg label:hover { border-color: var(--blue); }
.seg input:checked + label {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, .25);
}
.seg input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }
.seg label small { display: block; font-size: 12px; font-weight: 500; opacity: .8; }

/* 체크박스 그룹 */
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.checkbox { display: flex; align-items: center; gap: 10px; min-height: var(--tap);
  padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--card); cursor: pointer; font-size: 14px; font-weight: 500; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; margin: 0; }
.checkbox:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); font-weight: 600; }

/* 아코디언 */
details.acc { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card-alt); }
details.acc > summary {
  min-height: var(--tap); display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2);
  list-style: none;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: '＋'; margin-left: auto; color: var(--muted); font-size: 16px; }
details.acc[open] > summary::after { content: '－'; }
details.acc > .acc-body { padding: 4px 14px 16px; }

/* ── 버튼 ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 20px;
  font-size: 16px; font-weight: 700; font-family: inherit; line-height: 1.2;
  border-radius: var(--r-sm); border: 1.5px solid transparent; cursor: pointer;
  text-align: center; transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 10px rgba(29, 78, 216, .25); }
.btn-primary:hover { background: var(--blue-ink); }
.btn-ghost { background: var(--card); color: var(--ink-2); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-hope { background: var(--hope); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* 하단 고정 액션바 (모바일 위저드) */
.sticky-cta {
  position: sticky; bottom: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  margin-top: 20px;
}
.sticky-cta .wrap { display: flex; gap: 10px; }
.sticky-cta .btn { flex: 1; }
.sticky-cta .btn-ghost { flex: 0 0 92px; }

/* ── 스텝 진행 표시 ───────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 6px; padding: 16px 0 4px; }
.steps .dot {
  flex: 1; height: 6px; border-radius: 999px; background: var(--line-strong);
  transition: background .2s;
}
.steps .dot.on { background: var(--blue); }
.steps .dot.done { background: var(--hope); }
.step-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.step-panel[hidden] { display: none; }

/* ── 결과 ─────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--navy), #1B2C46);
  color: #fff; border-radius: var(--r); padding: 24px 20px; text-align: center;
}
.hero .hero-label { font-size: 14px; color: #B9C8DF; font-weight: 600; }
.hero .hero-value {
  font-size: clamp(30px, 9vw, 42px); font-weight: 800; letter-spacing: -.03em;
  margin: 6px 0 2px; font-variant-numeric: tabular-nums; line-height: 1.15;
}
.hero .hero-sub { font-size: 14px; color: #C7D4E8; }
.hero.hope { background: linear-gradient(160deg, #2F5C3A, #3F7A4B); }
.hero.muted-bg { background: linear-gradient(160deg, #37445C, #4A5872); }

.rows { border-top: 1px solid var(--line); margin-top: 4px; }
.row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.row .k { color: var(--muted); flex: 1 1 auto; }
.row .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row.total { border-bottom: none; }
.row.total .k { color: var(--ink); font-weight: 600; }
.row.total .v { font-size: 18px; color: var(--blue); }
.row .v.minus { color: var(--alert); }
.row small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); white-space: normal; line-height: 1.45; margin-top: 2px; }
.row .k small { color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.badge.ok { background: var(--hope-soft); color: var(--hope); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.no { background: var(--alert-soft); color: var(--alert); }
.badge.info { background: var(--blue-soft); color: var(--blue-ink); }

/* 체크리스트 */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.checklist li:last-child { border-bottom: none; }
.checklist .mark { flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.checklist .mark.ok { background: var(--hope-soft); color: var(--hope); }
.checklist .mark.no { background: var(--alert-soft); color: var(--alert); }
.checklist .txt { flex: 1; }
.checklist .txt b { display: block; font-weight: 600; }
.checklist .txt small { color: var(--muted); font-size: 13px; }
.checklist .txt .fail { color: var(--alert); font-size: 13.5px; display: block; margin-top: 2px; }

/* 알림 박스 */
.note {
  border-radius: var(--r-sm); padding: 14px 16px; font-size: 14px; line-height: 1.6;
  border: 1px solid var(--line); background: var(--card-alt); color: var(--ink-2);
}
.note b { color: var(--ink); }
.note.info { background: var(--blue-soft); border-color: transparent; color: var(--ink-2); }
.note.warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.note.warn b { color: var(--amber); }
.note.alert { background: var(--alert-soft); border-color: transparent; color: var(--alert); }
.note.alert b { color: var(--alert); }
.note.hope { background: var(--hope-soft); border-color: transparent; color: var(--hope); }
.note.hope b { color: var(--hope); }
.note-title { display: block; font-weight: 700; margin-bottom: 4px; }

/* 막대 그래프 */
.bar { display: flex; height: 34px; border-radius: 10px; overflow: hidden; background: var(--line); font-size: 12px; font-weight: 700; }
.bar span { display: grid; place-items: center; color: #fff; white-space: nowrap; min-width: 0; }
.bar .pay { background: var(--blue); }
.bar .cut { background: var(--hope-bright); color: #14310F; }
.bar-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.bar-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* 비교 카드 */
.compare { display: grid; gap: 12px; }
.compare .prog { border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 16px; background: var(--card); }
.compare .prog.good { border-color: var(--hope); background: var(--hope-soft); }
.compare .prog h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.compare .prog dl { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.compare .prog dt { color: var(--muted); white-space: nowrap; }
.compare .prog dd { margin: 0; font-weight: 600; }
.compare .prog .prog-note { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.55; font-weight: 400; }

/* 표 (가로 스크롤 보장) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 420px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; background: var(--card-alt); white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── 도구 목록 (허브) ─────────────────────────────────────────── */
.tools { display: grid; gap: 10px; }
.tool {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform .12s, border-color .12s;
}
.tool:hover { text-decoration: none; border-color: var(--blue); transform: translateY(-1px); }
.tool .ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-soft); font-size: 20px; }
.tool .tt { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tool .td { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.tool.feature { border-color: var(--blue); background: linear-gradient(180deg, var(--blue-soft), var(--card)); }

/* ── 프로필 배너 / 프라이버시 ─────────────────────────────────── */
.profile-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--hope-soft); color: var(--hope);
  border-radius: var(--r-sm); padding: 10px 14px; font-size: 13.5px; font-weight: 600;
}
.profile-banner button {
  margin-left: auto; background: none; border: 1px solid currentColor; color: inherit;
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  font-family: inherit; min-height: 32px;
}
.privacy {
  border: 1px dashed var(--line-strong); border-radius: var(--r-sm);
  padding: 14px 16px; font-size: 13px; color: var(--muted); line-height: 1.6;
  display: flex; flex-direction: column; gap: 10px;
}
.privacy b { color: var(--ink-2); }
.privacy button {
  align-self: flex-start; background: none; border: 1px solid var(--line-strong); color: var(--ink-2);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; min-height: 38px;
}
.privacy button:hover { border-color: var(--alert); color: var(--alert); }

/* ── 상담 CTA ─────────────────────────────────────────────────── */
.helplines { display: grid; gap: 10px; }
.helpline {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px;
  background: var(--card); color: inherit; min-height: var(--tap);
}
.helpline:hover { text-decoration: none; border-color: var(--hope); }
.helpline .no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--hope-soft);
  color: var(--hope); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.helpline .hl-name { font-weight: 700; font-size: 15px; }
.helpline .hl-desc { font-size: 12.5px; color: var(--muted); }
.helpline .hl-tel { margin-left: auto; font-weight: 800; color: var(--blue); white-space: nowrap; font-size: 15px; }

/* ── 트래커 ───────────────────────────────────────────────────── */
.ring { display: grid; place-items: center; position: relative; width: 180px; height: 180px; margin: 0 auto; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring .ring-bg { fill: none; stroke: var(--line); stroke-width: 12; }
.ring .ring-fg { fill: none; stroke: var(--hope-bright); stroke-width: 12; stroke-linecap: round;
  transition: stroke-dashoffset .6s ease; }
.ring .ring-txt { position: absolute; text-align: center; }
.ring .ring-txt .big { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.ring .ring-txt .small { font-size: 13px; color: var(--muted); font-weight: 600; }

.grid-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
@media (min-width: 480px) { .grid-cells { grid-template-columns: repeat(9, 1fr); } }
.cell {
  aspect-ratio: 1; border-radius: 9px; border: 1.5px solid var(--line-strong);
  background: var(--card); color: var(--muted);
  font-size: 11.5px; font-weight: 700; display: grid; place-items: center; cursor: pointer;
  font-family: inherit; padding: 0; min-height: 34px;
}
.cell.paid { background: var(--hope-bright); border-color: var(--hope); color: #14310F; }
.cell.due { border-color: var(--muted); border-style: dashed; }
.cell.missed { background: var(--card-alt); border-color: var(--line-strong); color: var(--muted); }
.cell.now { box-shadow: 0 0 0 3px var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.cell:disabled { cursor: default; opacity: .5; }
.cell-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.cell-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px;
  vertical-align: -2px; border: 1.5px solid var(--line-strong); }

/* ── 타임라인 ─────────────────────────────────────────────────── */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 20px 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .tl-dot {
  position: absolute; left: 0; top: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--line-strong); display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.timeline li.done .tl-dot { background: var(--hope); border-color: var(--hope); color: #fff; }
.timeline li.next .tl-dot { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.timeline .tl-when { font-size: 12.5px; font-weight: 700; color: var(--blue); }
.timeline li.done .tl-when { color: var(--hope); }
.timeline .tl-title { font-weight: 700; font-size: 15.5px; margin-top: 2px; }
.timeline .tl-desc { font-size: 14px; color: var(--ink-2); margin-top: 4px; line-height: 1.6; }
.timeline .tl-caution { font-size: 13px; color: var(--amber); margin-top: 6px; line-height: 1.55; }

/* ── FAQ / 본문 콘텐츠 ────────────────────────────────────────── */
.prose { font-size: 15px; color: var(--ink-2); line-height: 1.75; }
.prose h2 { font-size: 19px; color: var(--ink); margin: 28px 0 10px; }
.prose h3 { font-size: 16px; color: var(--ink); margin: 20px 0 6px; }
.prose p + p { margin-top: 10px; }
.prose ul { margin: 8px 0; }
.prose li + li { margin-top: 4px; }
/* 글 대표 이미지 (build 가 만드는 cover.svg) */
.post-cover { margin: 0 0 16px; }
.post-cover img { display: block; width: 100%; height: auto; border-radius: var(--r-sm, 8px); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 14px 0; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none;
  display: flex; gap: 10px; align-items: flex-start; min-height: var(--tap);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: 'Q'; color: var(--blue); font-weight: 800; flex: none; }
.faq .faq-a { padding: 0 0 16px 22px; font-size: 14.5px; color: var(--ink-2); line-height: 1.7; }

/* ── 푸터 ─────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--line); background: var(--card); margin-top: 40px;
  padding: 24px 0 calc(32px + env(safe-area-inset-bottom));
  font-size: 13px; color: var(--muted); line-height: 1.7;
}
footer.site .flinks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
footer.site a { color: var(--ink-2); }
footer.site .updated { margin-top: 10px; font-size: 12.5px; }

/* 광고 슬롯 — 계산기는 결과 섹션 바로 뒤 1개(결과 표시 후 요청), 콘텐츠 페이지는 본문 사이 */
.ad-slot {
  margin: 32px 0 0; min-height: 90px; border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--muted); font-size: 12px; background: var(--card-alt);
}

/* ── 토스트 ───────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90vw;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 태블릿 이상 ──────────────────────────────────────────────── */
@media (min-width: 640px) {
  .page-head h1 { font-size: 30px; }
  .card { padding: 24px 22px; }
  .compare { grid-template-columns: repeat(3, 1fr); }
  .compare .prog dl { grid-template-columns: 1fr; gap: 2px; }
  .compare .prog dt { font-size: 12.5px; margin-top: 6px; }
  .tools { grid-template-columns: repeat(2, 1fr); }
  .tool.feature { grid-column: 1 / -1; }
  .table-scroll { margin: 0; padding: 0; }
}

/* ── 인쇄 (상담 지참용 PDF 저장) ──────────────────────────────── */
@media print {
  :root { --bg: #fff; --card: #fff; --card-alt: #fff; --ink: #000; --ink-2: #222; --muted: #555; --line: #bbb; }
  body { background: #fff; font-size: 11pt; }
  .topbar, .sticky-cta, .ad-slot, .no-print, footer.site .flinks, .chips, .privacy button, .profile-banner button { display: none !important; }
  .wrap { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; page-break-inside: avoid; }
  .hero { background: #fff !important; color: #000 !important; border: 2px solid #000; }
  .hero .hero-label, .hero .hero-sub { color: #333 !important; }
  .print-only { display: block !important; }
  a[href^="http"]::after { content: ''; }
}
.print-only { display: none; }
/* ── 스테퍼 (부양가족 수 등) ─────────────────────────────────── */
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: var(--tap); height: var(--tap); flex: none;
  border-radius: var(--r-sm); border: 1.5px solid var(--line-strong);
  background: var(--card); color: var(--ink-2);
  font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; font-family: inherit;
}
.stepper button:hover { border-color: var(--blue); color: var(--blue); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.stepper .val {
  min-width: 78px; text-align: center; font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stepper .val small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }

/* 섹션 제목 (리포트) */
.sec-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 15px; font-weight: 700; color: var(--muted);
  padding-bottom: 8px; border-bottom: 2px solid var(--line); margin-bottom: 12px;
}
.sec-head .n {
  width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: 12px; flex: none;
}
.sec-head .sp { margin-left: auto; }

/* =============================================================================
 * 광고 (본문하단 1개 · spec 0.5 광고 배치 특례)
 * .ad-slot 은 원래 점선 플레이스홀더. 실제 광고가 들어가면 장식을 걷어낸다.
 * 미채움(unfilled) 시에는 슬롯 자체를 접어 빈 공간을 남기지 않는다.
 * ========================================================================== */
.ad-slot:has(> ins.adsbygoogle) {
  border: 0; background: none; display: block; padding: 0;
  /* 광고는 비동기로 들어온다. 자리를 비워 두면 로드 순간 본문이 밀려 CLS(레이아웃 점프)가
     발생하고, 이는 코어 웹 바이탈 = 검색 순위 신호다. 최소 높이로 자리를 먼저 잡아 둔다. */
  min-height: 100px;
}
.ad-slot:has(> ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none !important; margin: 0 !important;
}
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
/* .ad-slot 의 display 선언이 [hidden] 의 기본 display:none 을 덮어쓰므로 명시적으로 되돌린다.
   (광고 슬롯을 조건부로 숨길 때 안 접히는 사고 방지) */
.ad-slot[hidden] { display: none !important; margin: 0 !important; }

/* =============================================================================
 * 콘텐츠 사이트 컴포넌트 (허브·포스트 페이지)
 * build/render.js 가 생성하는 마크업 전용. 기존 토큰만 사용한다.
 * ========================================================================== */

/* ── 브레드크럼 ───────────────────────────────────────────────── */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; line-height: 1.5; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb [aria-current="page"] { color: var(--ink-2); font-weight: 600; }

/* ── 핵심 요약 박스 (스니펫 타깃) ─────────────────────────────── */
.answer-box {
  margin-top: 16px; padding: 18px 18px 16px;
  background: var(--hope-soft); border: 1px solid var(--hope);
  border-radius: var(--r);
}
.answer-box .ab-title {
  display: block; font-size: 13px; font-weight: 800; color: var(--hope);
  letter-spacing: .02em; margin-bottom: 10px;
}
.answer-box ul { margin: 0; padding-left: 0; list-style: none; }
.answer-box li {
  position: relative; padding-left: 20px; font-size: 15px; line-height: 1.7; color: var(--ink);
}
.answer-box li + li { margin-top: 9px; }
.answer-box li::before {
  content: ''; position: absolute; left: 4px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--hope);
}
.answer-box a { color: var(--blue-ink); font-weight: 600; }

/* ── 기간 시리즈 내비게이션 ───────────────────────────────────── */
.series-nav {
  margin-top: 16px; padding: 16px 18px;
  background: var(--blue-soft); border: 1px solid var(--line);
  border-radius: var(--r);
}
.series-nav .sn-title {
  display: block; font-size: 13px; font-weight: 700; color: var(--blue-ink); margin-bottom: 10px;
}
.series-nav ol {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px 8px; counter-reset: sn;
}
.series-nav li {
  counter-increment: sn; font-size: 13.5px; line-height: 1.5;
  padding: 6px 11px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
}
.series-nav li::before { content: counter(sn) '. '; color: var(--muted); font-weight: 700; }
.series-nav li[aria-current] { background: var(--blue); border-color: var(--blue); }
.series-nav li[aria-current] b { color: #fff; font-weight: 700; }
.series-nav li[aria-current]::before { color: rgba(255, 255, 255, .7); }

/* ── 계산기 CTA ───────────────────────────────────────────────── */
.calc-cta {
  margin-top: 16px;
  background: linear-gradient(180deg, var(--blue-soft), var(--card));
  border-color: var(--line-strong);
}
.calc-cta .card-sub { color: var(--ink-2); line-height: 1.7; }

/* ── 공식 안내 (외부링크) ─────────────────────────────────────── */
ul.official { margin: 0; padding: 0; list-style: none; }
ul.official li {
  padding: 12px 0; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px;
}
ul.official li:first-child { border-top: 0; }
ul.official li a { font-weight: 600; font-size: 15px; }
ul.official li a::after { content: ' ↗'; font-size: 12px; color: var(--muted); }
ul.official li span { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ── 홈: 가장 많이 찾는 질문 TOP 10 ───────────────────────────── */
ol.top10 { margin: 0; padding: 0; list-style: none; }
ol.top10 li { border-top: 1px solid var(--line); }
ol.top10 li:first-child { border-top: 0; }
ol.top10 a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 2px; color: var(--ink); min-height: var(--tap);
}
ol.top10 a:hover .q { color: var(--blue); }
ol.top10 .rank {
  flex: none; width: 24px; text-align: center;
  font-size: 15px; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums;
}
ol.top10 .q { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.5; }
ol.top10 .cat { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── 면책 문구 · 최종 수정일 ──────────────────────────────────── */
.card.legal { margin-top: 16px; }
.card.legal .legal-txt { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }
.card.legal .updated-line {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}

/* ── 표 캡션 ──────────────────────────────────────────────────── */
.tbl-cap { caption-side: top; text-align: left; font-size: 13px; color: var(--muted); padding: 0 0 8px; }

/* ── prose 안의 컴포넌트 여백 보정 ────────────────────────────── */
.prose .table-scroll { margin-top: 12px; margin-bottom: 12px; }
.prose .note { margin-top: 14px; }
.prose .checklist, .prose .timeline { margin-top: 12px; }
.prose ol { margin: 8px 0; padding-left: 20px; }
.prose ol li + li { margin-top: 6px; }
.prose h2:first-child { margin-top: 0; }

/* ── 태블릿 이상 ──────────────────────────────────────────────── */
@media (min-width: 720px) {
  .answer-box { padding: 22px 24px 20px; }
  .answer-box li { font-size: 15.5px; }
  ol.top10 .q { font-size: 15.5px; }
}

/* ── 푸터 그룹 (계산기 / 가이드 / 문서) ───────────────────────── */
footer.site .fgroup {
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  letter-spacing: .04em; margin: 14px 0 6px;
}
footer.site .fgroup:first-child { margin-top: 0; }
footer.site .flinks { gap: 8px 14px; margin-bottom: 0; }
footer.site .fmeta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
/* 발행인 고지 — 전 페이지 공통 */
footer.site .fbiz {
  display: block; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-style: normal; font-size: 12.5px; line-height: 1.8; color: var(--muted);
}
footer.site .fbiz b { color: var(--ink-2); }
footer.site > .wrap > p:not(.fgroup) { margin-top: 14px; }

/* ── 계산기 → 가이드 크로스링크 ───────────────────────────────── */
ul.guidelinks { margin: 0; padding: 0; list-style: none; }
ul.guidelinks li { border-top: 1px solid var(--line); }
ul.guidelinks li:first-child { border-top: 0; }
ul.guidelinks a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 2px; min-height: var(--tap); justify-content: center; color: var(--ink);
}
ul.guidelinks a:hover { text-decoration: none; }
ul.guidelinks a:hover .gl-t { color: var(--blue); text-decoration: underline; }
ul.guidelinks .gl-t { font-size: 15px; font-weight: 600; line-height: 1.45; }
ul.guidelinks .gl-d { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── 글쓴이 표시줄 (누가 썼는가 · 언제 고쳤는가) ──────────────── */
.page-head .author-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.page-head .author-line .al-by { color: var(--ink-2); font-weight: 600; }
.page-head .author-line .al-by a { color: var(--ink-2); }
.page-head .author-line .al-role {
  margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  background: var(--card-alt); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; color: var(--muted);
}
.page-head .author-line .al-dates { font-variant-numeric: tabular-nums; }

/* ── 운영 주체 표 (사이트 소개 · 개인정보처리방침) ───────────── */
dl.bizinfo {
  display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px;
  margin: 14px 0 0; font-size: 14px; line-height: 1.6;
}
dl.bizinfo dt { font-weight: 700; color: var(--muted); font-size: 13px; }
dl.bizinfo dd { margin: 0; color: var(--ink-2); }
@media (max-width: 480px) {
  dl.bizinfo { grid-template-columns: 1fr; gap: 2px; }
  dl.bizinfo dd { margin-bottom: 8px; }
}

/* ── 작성 근거 바이라인 (E-E-A-T 경험 신호) ──────────────────── */
.page-head .byline {
  margin-top: 10px; padding: 10px 12px;
  background: var(--hope-soft); border-left: 3px solid var(--hope); border-radius: var(--r-xs);
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}

/* ── 법령 기준 사례 블록 ──────────────────────────────────────── */
.case {
  margin-top: 18px; padding: 16px 16px 15px;
  background: var(--card-alt); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.prose .case h3 { margin: 0 0 4px; font-size: 15.5px; color: var(--ink); }
.case dl { margin: 0; }
.case dt {
  margin-top: 12px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .04em; color: var(--muted);
}
.case dt.good { color: var(--hope); }
.case dt.bad { color: var(--alert); }
.case dd { margin: 3px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.case dd > ol, .case dd > ul { margin: 4px 0 0; padding-left: 18px; }
.case dd > ol > li + li, .case dd > ul > li + li { margin-top: 5px; }
.case .table-scroll { margin: 8px -16px 0; padding: 0 16px; }

/* =============================================================================
 * 블로그형 레이아웃 — 상단바 검색 · 카테고리 바 · 본문 + 사이드바 · 글 카드
 * 계산기 8종은 본문이 기존 680px .wrap 그대로이고, 상단바·푸터만 넓어진다.
 * ========================================================================== */
.topbar .wrap, .catbar .wrap, .disclaimer .wrap, footer.site .wrap, .wrap.layout { max-width: var(--maxw-wide); }

/* 상단바 검색 */
.search { display: flex; align-items: stretch; }
.search input[type="search"] {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line-strong); border-right: 0;
  border-radius: 999px 0 0 999px; padding: 10px 16px; min-height: 44px; appearance: none;
}
.search input[type="search"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.search button {
  flex: none; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 0 999px 999px 0; padding: 0 18px; background: var(--blue); color: #fff;
}
.search button:hover { background: var(--blue-ink); }
.topbar .search-top { flex: 1; max-width: 380px; margin-left: 20px; }
.topbar .search-top input[type="search"] {
  background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff;
  min-height: 38px; padding: 6px 14px; font-size: 14px;
}
.topbar .search-top input[type="search"]::placeholder { color: #A9B6CC; }
.topbar .search-top input[type="search"]:focus { background: #fff; color: var(--ink); box-shadow: none; }
.topbar .search-top button { padding: 0 14px; font-size: 13px; }
.topbar .search-ico {
  display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 50%;
  align-items: center; justify-content: center; color: #fff;
}
.topbar .search-ico:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }

/* 카테고리 바 */
.catbar { background: var(--card); border-bottom: 1px solid var(--line); }
.catbar .wrap {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; white-space: nowrap;
}
.catbar .wrap::-webkit-scrollbar { display: none; }
.catbar a {
  flex: none; font-size: 14px; font-weight: 600; color: var(--ink-2);
  padding: 12px 10px; border-bottom: 2px solid transparent;
}
.catbar a:hover { color: var(--blue); text-decoration: none; }
.catbar a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.catbar .cb-m { display: none; }

@media (max-width: 899px) {
  .topbar .search-top, .topbar nav { display: none; }
  .topbar .search-ico { display: inline-flex; }
  .catbar .cb-m { display: inline-block; color: var(--blue-ink); }
}

/* 본문 + 사이드바 */
.wrap.layout { display: block; }
.wrap.layout > main { min-width: 0; }
.sidebar { margin-top: 32px; display: grid; gap: 16px; }
@media (min-width: 1024px) {
  .wrap.layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start;
  }
  .sidebar { margin-top: 24px; position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; scrollbar-width: thin; }
}
.side-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 16px; box-shadow: var(--shadow-sm);
}
.side-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.side-cta { background: var(--blue-soft); border-color: transparent; }
.side-cta p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin-bottom: 12px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { border-top: 1px solid var(--line); }
.side-list a { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; color: var(--ink); font-size: 14px; line-height: 1.5; }
.side-list a span { flex: 1; }
.side-list a:hover { text-decoration: none; }
.side-list a:hover span { color: var(--blue); text-decoration: underline; }
.side-list time { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-rank .rk { flex: none; width: 18px; color: var(--blue); font-weight: 800; font-size: 14px; }
.side-more { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; }
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats a { display: flex; align-items: center; gap: 6px; padding: 7px 0; color: var(--ink-2); font-size: 14px; }
.side-cats a:hover { color: var(--blue); text-decoration: none; }
.side-cats .cnt {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--card-alt); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px;
}

/* 홈 헤더 + 검색 */
.home-head { padding-top: 28px; }
.page-head .search { margin-top: 16px; max-width: 560px; }
.page-head .search input[type="search"] { min-height: 50px; }

/* 섹션 머리 */
.sec-row { display: flex; align-items: baseline; gap: 12px; margin: 24px 0 12px; }
.sec-row h2 { font-size: 20px; }
.sec-row .sec-meta { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sec-row a { margin-left: auto; font-size: 14px; font-weight: 600; white-space: nowrap; }

/* 글 카드 목록 */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-grid { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-grid .pc:first-child { grid-column: 1 / -1; }
  .post-grid .pc:first-child .pc-t { font-size: 20px; }
}
.pc > a {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: var(--shadow-sm); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pc > a:hover { text-decoration: none; border-color: var(--blue); box-shadow: var(--shadow); }
.pc > a:hover .pc-t { color: var(--blue); }
.pc-cat { font-size: 12.5px; font-weight: 700; color: var(--hope); }
.pc-t { font-size: 17px; font-weight: 800; line-height: 1.45; letter-spacing: -.02em; }
.pc-d {
  font-size: 14px; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-meta { margin-top: auto; padding-top: 4px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pc[hidden], .post-list[hidden] { display: none; }

/* 검색 페이지 */
.sr-status { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 20px 0 12px; }
.sr-empty[hidden] { display: none; }
.btn-danger:hover { border-color: var(--alert); color: var(--alert); }

/* ── 홈 화면에 추가 ───────────────────────────────────────────── */
[data-a2hs][hidden], [data-a2hs-box][hidden] { display: none !important; }
.a2hs-link {
  font: inherit; font-size: 13px; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer;
}
.a2hs-link:hover { text-decoration: underline; }
.side-app p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin-bottom: 12px; }
.a2hs-sheet {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 27, 45, .55);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.a2hs-panel {
  width: 100%; max-width: 420px; background: var(--card); color: var(--ink);
  border-radius: var(--r); padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow);
}
.a2hs-panel h2 { font-size: 18px; margin-bottom: 6px; }
.a2hs-panel p { font-size: 14px; color: var(--muted); }
.a2hs-panel ol { margin: 14px 0 18px; padding-left: 20px; font-size: 15px; line-height: 1.6; }
.a2hs-panel li + li { margin-top: 8px; }
@media (min-width: 720px) { .a2hs-sheet { align-items: center; } }

/* 상단바 홈 화면 추가 버튼 — 데스크톱은 글자까지, 모바일은 아이콘+짧은 글자 */
.topbar .a2hs-top {
  flex: none; margin-left: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px; padding: 6px 12px; min-height: 36px; white-space: nowrap;
}
.topbar .a2hs-top:hover { background: rgba(255, 255, 255, .22); }
@media (max-width: 899px) {
  .topbar .a2hs-top { margin-left: auto; padding: 6px 10px; }
  .topbar .a2hs-top + .search-ico { margin-left: 4px; }
}
@media (max-width: 359px) { .topbar .a2hs-top span { display: none; } }

/* =============================================================================
 * 워드프레스형 글 레이아웃 (build/render.js renderPost)
 * article.post > header.entry-header + div.entry-content + footer.entry-footer
 * 본문을 카드로 쪼개지 않고 하나의 흰 종이 위에 이어 쓴다.
 * ========================================================================== */
article.post {
  margin-top: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 4px 18px 22px;
}
@media (min-width: 720px) { article.post { padding: 10px 36px 30px; } }
article.post .entry-header { padding: 20px 0 4px; }
article.post .entry-title { font-size: 26px; line-height: 1.4; }
@media (min-width: 720px) { article.post .entry-title { font-size: 31px; } }
.cat-links a { font-size: 13px; font-weight: 700; color: var(--hope); }
.entry-header .cat-links { margin-bottom: 8px; }

.entry-content { margin-top: 18px; font-size: 16.5px; line-height: 1.85; }
.entry-content > p.lead { font-size: 16.5px; color: var(--ink-2); margin-top: 0; }
.entry-content p + p { margin-top: 14px; }
.entry-content h2 {
  font-size: 21px; margin: 44px 0 14px; padding: 2px 0 10px 12px;
  border-left: 4px solid var(--blue); border-bottom: 1px solid var(--line);
  scroll-margin-top: 72px;
}
.entry-content h3 { font-size: 17.5px; margin: 26px 0 8px; }
.entry-content .byline {
  margin-top: 14px; padding: 10px 12px;
  background: var(--hope-soft); border-left: 3px solid var(--hope); border-radius: var(--r-xs);
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}
.entry-content .answer-box, .entry-content .series-nav { margin-top: 22px; }
.entry-content .ad-slot { margin: 26px 0; }
/* 본문 흐름 안의 카드형 블록(계산기 CTA)은 본문 h2 스타일을 받지 않는다 */
.entry-content .card { margin-top: 30px; }
.entry-content .card .card-title { font-size: 17px; margin: 0 0 4px; padding: 0; border: 0; }
.entry-content .faq { margin-top: 6px; font-size: 15.5px; line-height: 1.75; }

/* 목차 */
.toc {
  margin-top: 26px; background: var(--card-alt); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 4px 18px; font-size: 15px;
}
.toc summary { cursor: pointer; font-weight: 800; padding: 10px 0; min-height: 44px; }
.toc ol { margin: 0 0 12px; padding-left: 22px; }
.toc li + li { margin-top: 4px; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--blue); }

/* 글 하단 메타 · 글쓴이 상자 */
.entry-footer {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 30px; padding-top: 14px;
  border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted);
}
.entry-footer a { font-weight: 600; margin-left: 4px; font-size: 13.5px; }
.entry-footer .tags-links a { color: var(--ink-2); background: var(--card-alt); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }
.author-box {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 16px;
  background: var(--card-alt); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.author-box .ab-avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 24px; background: var(--hope-soft);
}
.author-box .ab-name { font-weight: 700; font-size: 15px; }
.author-box .al-role {
  margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); font-size: 11.5px; color: var(--muted);
}
.author-box .ab-desc { margin-top: 4px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* 이전 글 · 다음 글 */
.post-navigation { margin-top: 16px; }
.post-navigation .nav-links { display: grid; gap: 12px; }
@media (min-width: 720px) { .post-navigation .nav-links { grid-template-columns: 1fr 1fr; } }
.post-navigation a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink);
}
.post-navigation a:hover { text-decoration: none; border-color: var(--blue); }
.post-navigation .nav-next { text-align: right; grid-column: -2; }
.post-navigation .meta-nav { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.post-navigation .post-title { font-size: 15px; font-weight: 700; line-height: 1.5; }
article.post ~ .card { margin-top: 16px; }
