/*
 * finyul 본문 블록 (2026-10-23). 새 글의 도표는 이 클래스만 쓴다(docs/BLOCKS.md).
 * 글자 크기는 여기서만 정한다: 블록 안 글은 모두 15px, 입력칸 16px, 자료 표기 14px.
 * 굵기와 색으로만 위계를 나누고, 본문에 font-size·color 인라인 스타일을 쓰지 않는다.
 */
body .entry-content [class^="fy-"], body .entry-content [class*=" fy-"] { box-sizing: border-box; }
body .entry-content figure[class^="fy-"], body .entry-content div.fy-note, body .entry-content blockquote.fy-quote, body .entry-content div.fy-compare {
  margin: 32px 0;
  font-size: 15px;
  line-height: 1.7;
  color: #282d35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body .entry-content [class^="fy-"] p, body .entry-content [class^="fy-"] ul, body .entry-content [class^="fy-"] ol, body .entry-content [class^="fy-"] dl { margin: 0; padding: 0; font-size: 15px; line-height: 1.7; }
body .entry-content [class^="fy-"] li { margin: 0; }
/* 본문 목록 간격(.prose-readability ol>li~li)이 블록 안으로 새지 않게 */
body .entry-content [class^="fy-"] :is(ol, ul) > li:not([hidden]) ~ li:not([hidden]) { margin-top: 0; }
body .entry-content [class^="fy-"] b, body .entry-content [class^="fy-"] strong { font-weight: 700; color: #171b21; }
body .entry-content [class^="fy-"] figcaption { margin-top: 8px; color: #5c636d; font-size: 14px; line-height: 1.6; text-align: center; }
body .entry-content table > caption { caption-side: bottom; margin-top: 8px; padding: 0; color: #6f7783; font-size: 14px; line-height: 1.6; text-align: left; }

/* 상자 공통: 흰 바탕, 옅은 테두리. 제목줄이 있으면 남색 옅은 띠. */
body .entry-content .fy-box { overflow: hidden; border: 1px solid #e3e5e9; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(23, 27, 33, .05); }
body .entry-content .fy-head { padding: 12px 20px; border-bottom: 1px solid #e3ecf6; background: #f2f6fb; }
body .entry-content .fy-head .fy-title { color: #1d3a5c; font-weight: 700; }
body .entry-content .fy-head .fy-sub { margin-top: 4px; color: #525a66; }
body .entry-content .fy-body { padding: 18px 20px; }
/* 롱테일 안내 목록 fy-guide (2026-11-21 중테일 — 사용자 "카드 안이라 글씨가 너무 작아 보임, 문단으로 빼되 카드 형태로" → 같은 날 "블록도 빼 줘도"):
   카드(fy-card) 밖에 두는 목록. 글자는 본문과 같은 크기로 두고(블록 15px 규칙을 덮음), 상자 없이 항목 사이 여백과 굵은 상황 줄로만 나눈다. */
body .entry-content ul.fy-guide { margin: 20px 0 32px; padding: 0; list-style: none; display: grid; gap: 26px; }
body .entry-content ul.fy-guide > li { margin: 0; padding: 0; }
body .entry-content ul.fy-guide p { margin: 0 0 6px; font-size: inherit; line-height: 1.75; }
body .entry-content ul.fy-guide li > p:first-child { color: #1d3a5c; font-weight: 700; }
body .entry-content ul.fy-guide li > p:last-child { margin-bottom: 0; font-weight: 700; }
body .entry-content p.fy-end { margin-top: 18px; padding-top: 12px; border-top: 1px solid #f1f2f4; color: #254a75; font-weight: 700; }

body .entry-content .fy-box > figcaption { margin: 0; padding: 10px 20px; border-top: 1px solid #f1f2f4; background: #fcfcfd; text-align: left; }

/* 주의·참고 박스 */
body .entry-content .fy-note { padding: 16px 20px; border: 1px solid #e3e5e9; border-left: 4px solid #6795c5; border-radius: 10px; background: #f8f9fa; }
body .entry-content .fy-note--warn { border-left-color: #d97706; background: #fffbeb; }
body .entry-content .fy-note .fy-label { margin-bottom: 6px; color: #525a66; font-weight: 700; }
body .entry-content .fy-note--warn .fy-label { color: #92400e; }
body .entry-content .fy-note p + p { margin-top: 8px; }

/* 계산·예시 카드: 항목 | 값 */
body .entry-content .fy-card dl > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid #f1f2f4; }
body .entry-content .fy-card dl > div:last-child { border-bottom: 0; }
/* 값이 없는 결과 행은 숨긴다 — display:flex가 hidden 속성을 덮어 빈 줄이 남던 것(2026-11-22) */
body .entry-content .fy-card dl > div[hidden] { display: none; }
body .entry-content .fy-card dt { color: #3d444e; }
body .entry-content .fy-card dd { margin: 0 0 0 auto; color: #171b21; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
body .entry-content .fy-card dl > div.is-total { margin-top: 4px; padding-top: 12px; border-top: 2px solid #e3e5e9; border-bottom: 0; }
body .entry-content .fy-card dl > div.is-total dt { color: #171b21; font-weight: 700; }
body .entry-content .fy-card dl > div.is-total dd { color: #1d3a5c; }
body .entry-content .fy-card .is-good dd { color: #15803d; }
body .entry-content .fy-card .is-bad dd { color: #b45309; }
body .entry-content .fy-card .fy-calc { display: grid; gap: 14px; margin-bottom: 18px; }
body .entry-content .fy-card .fy-calc label { display: block; color: #282d35; font-weight: 700; }
body .entry-content .fy-card .fy-calc input:not([type="checkbox"]):not([type="radio"]), body .entry-content .fy-card .fy-calc select { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 0 12px; border: 1px solid #cbcfd6; border-radius: 8px; background: #fff; color: #171b21; font-size: 16px; font-weight: 400; box-sizing: border-box; }
body .entry-content .fy-card .fy-calc input:focus, body .entry-content .fy-card .fy-calc select:focus { border-color: #2f5c8f; outline: 2px solid #c6d8ec; }
/* 체크박스 선택지: 한 줄(체크 + 문구), 굵지 않게, 아래 회색 설명 한 줄. label.fy-opt 또는 체크박스를 직접 담은 label. */
body .entry-content .fy-card .fy-calc label.fy-opt, body .entry-content .fy-card .fy-calc label:has(> input[type="checkbox"]) { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-top: 10px; font-weight: 400; color: #171b21; cursor: pointer; }
body .entry-content .fy-card .fy-calc input[type="checkbox"], body .entry-content .fy-card .fy-calc input[type="radio"] { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: #2f5c8f; cursor: pointer; }
body .entry-content .fy-card .fy-calc input[type="checkbox"]:focus-visible { outline: 2px solid #c6d8ec; outline-offset: 2px; }
body .entry-content .fy-card .fy-calc .fy-hint { display: block; margin-top: 2px; color: #5b6270; font-size: 15px; font-weight: 400; line-height: 1.5; }
body .entry-content .fy-card .fy-result { padding: 4px 16px; border-radius: 8px; background: #f8f9fa; }

/* 확인 순서·흐름: 번호 원 + 세로선 */
body .entry-content .fy-steps ol { list-style: none; counter-reset: fy-step; }
body .entry-content .fy-steps ol > li { position: relative; padding: 0 0 18px 40px; counter-increment: fy-step; }
body .entry-content .fy-steps ol > li::before { content: counter(fy-step); position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #254a75; color: #fff; font-weight: 700; line-height: 1; }
body .entry-content .fy-steps ol > li::after { content: ""; position: absolute; top: 32px; bottom: 4px; left: 13.5px; width: 1px; background: #e3e5e9; }
body .entry-content .fy-steps ol > li:last-child { padding-bottom: 0; }
body .entry-content .fy-steps ol > li:last-child::after { display: none; }
body .entry-content .fy-steps li > p:first-child { padding-top: 2px; color: #171b21; font-weight: 700; }
body .entry-content .fy-steps li > p + p { margin-top: 4px; color: #3d444e; }
body .entry-content .fy-steps .fy-if { color: #9a3412; }
body .entry-content .fy-steps .fy-if b { color: #9a3412; }

/* 타임라인: 점 + 세로선. 중요한 날은 is-key */
body .entry-content .fy-timeline ol { list-style: none; }
body .entry-content .fy-timeline ol > li { position: relative; padding: 0 0 18px 30px; }
body .entry-content .fy-timeline ol > li::before { content: ""; position: absolute; top: 7px; left: 0; width: 14px; height: 14px; border: 2px solid #cbcfd6; border-radius: 50%; background: #fff; }
body .entry-content .fy-timeline ol > li::after { content: ""; position: absolute; top: 25px; bottom: 2px; left: 6.5px; width: 1px; background: #e3e5e9; }
body .entry-content .fy-timeline ol > li:last-child { padding-bottom: 0; }
body .entry-content .fy-timeline ol > li:last-child::after { display: none; }
body .entry-content .fy-timeline .fy-when { color: #6f7783; font-weight: 700; }
body .entry-content .fy-timeline .fy-when + p { margin-top: 2px; color: #282d35; }
body .entry-content .fy-timeline li.is-key::before { border-color: #d97706; background: #f59e0b; }
body .entry-content .fy-timeline li.is-key .fy-when { color: #92400e; }
body .entry-content .fy-timeline li.is-key .fy-when + p { color: #171b21; font-weight: 700; }

/* 두 경우 비교: PC 두 칸, 모바일 한 칸 */
body .entry-content .fy-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
body .entry-content .fy-compare > section { padding: 16px 18px; border: 1px solid #e3e5e9; border-radius: 12px; background: #fff; }
body .entry-content .fy-compare > section.is-key { border-color: #9bbadb; background: #f2f6fb; }
body .entry-content .fy-compare .fy-title { margin-bottom: 8px; color: #1d3a5c; font-weight: 700; }
body .entry-content .fy-compare ul { padding-left: 18px; list-style: disc; }
body .entry-content .fy-compare ul li + li { margin-top: 4px; }
body .entry-content .fy-compare > figcaption { grid-column: 1 / -1; margin-top: 0; }

/* 원문 인용(법령·판결·안내문) */
body .entry-content .fy-quote { padding: 18px 20px; border: 1px solid #e3e5e9; border-left: 4px solid #254a75; border-radius: 10px; background: #fff; }
body .entry-content .fy-quote p { color: #171b21; }
body .entry-content .fy-quote p + p { margin-top: 8px; }
body .entry-content .fy-quote cite { display: block; margin-top: 10px; color: #6f7783; font-size: 14px; font-style: normal; }

/* 막대 비교: <li style="--v:62%"> 만 인라인으로 쓴다 */
body .entry-content .fy-bars ul { list-style: none; }
body .entry-content .fy-bars li { display: grid; grid-template-columns: minmax(84px, 30%) 1fr; align-items: center; gap: 4px 12px; padding: 6px 0; }
body .entry-content .fy-bars li > span:first-child { color: #3d444e; }
body .entry-content .fy-bars li > span:last-child { position: relative; display: flex; align-items: center; min-height: 26px; }
body .entry-content .fy-bars li > span:last-child::before { content: ""; width: var(--v, 0); min-width: 2px; height: 18px; border-radius: 4px; background: #6795c5; }
body .entry-content .fy-bars li.is-key > span:last-child::before { background: #254a75; }
body .entry-content .fy-bars li b { margin-left: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 체크리스트 */
body .entry-content .fy-check ul { list-style: none; }
body .entry-content .fy-check li { position: relative; padding: 4px 0 4px 28px; }
body .entry-content .fy-check li::before { content: ""; position: absolute; top: 10px; left: 4px; width: 12px; height: 7px; border-left: 2px solid #254a75; border-bottom: 2px solid #254a75; transform: rotate(-45deg); }

@media (max-width: 768px) {
  body .entry-content .fy-head, body .entry-content .fy-body { padding-left: 16px; padding-right: 16px; }
  body .entry-content .fy-note, body .entry-content .fy-quote { padding: 14px 16px; }
  body .entry-content .fy-bars li { grid-template-columns: 1fr; }
}

/* 계산기 결과 색: calculators.js가 dd에 붙이는 클래스 */
body .entry-content .fy-card dd.text-green-700 { color: #15803d; }
body .entry-content .fy-card dd.text-amber-700 { color: #b45309; }
body .entry-content .fy-card .finyul-calc-warning { margin: 12px 0 0; color: #b45309; font-size: 15px; }

/* 글마다 맞춘 인라인 SVG 도식 (2026-11-03). 모양은 글 내용이 정한다 — 여기선 크기·여백만. */
body .entry-content figure.fy-figure { margin: 32px auto; max-width: 440px; } /* viewBox 400·font-size 15 → 모바일 약 13.6px, 데스크톱 16.5px */
body .entry-content figure.fy-figure > svg { display: block; width: 100%; height: auto; overflow: visible; }
/* 표 모바일(2026-11-06): 좁은 열에서 한 글자씩 꺾이던 것 — 낱말 단위로 줄바꿈하고, 넘치면 표만 가로로 밀어 본다 */
body .entry-content table { word-break: keep-all; overflow-wrap: break-word; }
body .entry-content th, body .entry-content td { min-width: 4.5em; }
@media (max-width: 640px) {
  body .entry-content > table, body .entry-content > figure:not([class^="fy-"]) > table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* 두 칸 이하 표(2026-11-20 콜드 리드: 2-A 줄 이름 표의 '이럴 때' 칸이 잘림)는 밀지 않고 폭 안에서 줄을 바꾼다 — 가로 스크롤은 숫자 칸이 많은 표에만 */
}
/* 두 칸 이하 표(2026-11-20 콜드 리드: 2-A 줄 이름 표의 '이럴 때' 칸이 모바일에서 잘림)는 밀지 않고 폭 안에서 줄을 바꾼다.
   본문 표는 .table-scroll로 감싸이고 content.css가 min-width 26rem을 주는데, 가로 스크롤은 숫자 칸이 많은 표에만 둔다. */
/* 세 칸 표도 같다(2026-11-21 중테일 1 값 표: 셋째 칸 '받는 돈'이 화면 밖으로 밀림 — view-check는 3칸 이하 가로 스크롤을 막는다) */
body .entry-content .table-scroll > table:not(:has(tr > :nth-child(4))) { min-width: 0; width: 100%; }
body .entry-content .table-scroll > table:not(:has(tr > :nth-child(4))) th { white-space: normal; }
body .entry-content .table-scroll > table td { font-variant-numeric: tabular-nums; }
/* 모바일에서 .table-scroll의 음수 여백이 오른쪽으로 펴지지 않아 표가 글 폭보다 32px 좁았다(2026-11-21 3-C '8,000만 원' 줄바꿈) — 3칸 이하 표는 여백 없이 글 폭 그대로 */
body .entry-content .table-scroll:has(> table):not(:has(tr > :nth-child(4))) { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
/* 화면 캡처 fy-shot (2026-11-13): 공식 화면을 직접 찍은 근거. 테두리로 화면임을 보이고, 캡션에 출처·캡처 날짜 */
body .entry-content figure.fy-shot { margin: 28px 0; }
body .entry-content figure.fy-shot a { display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
/* 폭을 글자 크기에 맞춰 줄인 캡처는 가운데에 두고 캡션도 가운데로(2026-11-21 사용자) */
body .entry-content figure.fy-shot figcaption { text-align: center; }
body .entry-content figure.fy-shot img { display: block; width: var(--shot-w, auto); max-width: 100%; height: auto; border: 1px solid #d9e2ee; border-radius: 8px; background: #fff; }
/* 계산기 여러 줄 입력(2026-11-21, 1-B fourweek 주별 시간) — 한 줄 입력과 같은 모양, 글자 16px */
body .entry-content .fy-card .fy-calc textarea { display: block; width: 100%; min-height: 96px; margin-top: 6px; padding: 10px 12px; border: 1px solid #cbcfd6; border-radius: 8px; background: #fff; color: #171b21; font: inherit; font-size: 16px; line-height: 1.5; resize: vertical; box-sizing: border-box; }
body .entry-content .fy-card .fy-calc textarea:focus { border-color: #2f5c8f; outline: 2px solid #c6d8ec; }

/* 계산기 접힌 칸(퇴직금 클러스터, 2026-11-22) */
body .entry-content .fy-card details.fy-calc-more { margin: 0 0 18px; padding: 10px 14px; border: 1px solid #e3e5e9; border-radius: 8px; }
body .entry-content .fy-card details.fy-calc-more > summary { cursor: pointer; font-weight: 700; color: #2f5c8f; }
body .entry-content .fy-card details.fy-calc-more[open] > summary { margin-bottom: 12px; }
body .entry-content .fy-card details.fy-calc-more .fy-calc { margin-bottom: 4px; }
/* 항목·뜻·값 3칸 표: 좁은 화면에서 가운데 글 칸이 가장 좁아 낱말마다 줄이 바뀌던 것(2026-11-22, 5-B) — 가운데 칸을 넓게, 값 칸은 숫자 폭만 */
@media (max-width: 600px) {
  body .entry-content table[data-cols="mid-wide"] { table-layout: fixed; width: 100%; }
  body .entry-content table[data-cols="mid-wide"] th:nth-child(1), body .entry-content table[data-cols="mid-wide"] td:nth-child(1) { width: 27%; }
  body .entry-content table[data-cols="mid-wide"] th:nth-child(2), body .entry-content table[data-cols="mid-wide"] td:nth-child(2) { width: 38%; }
  body .entry-content table[data-cols="mid-wide"] th:nth-child(3), body .entry-content table[data-cols="mid-wide"] td:nth-child(3) { width: 35%; }
  body .entry-content table[data-cols="mid-wide"] td:nth-child(3) { overflow-wrap: normal; word-break: keep-all; }
}
