/* 블로그 본문 표(table) 한글 줄바꿈 개선
 * - word-break: keep-all : 한글 어절 중간에서 줄바꿈하지 않음 (어색한 분절 방지)
 * - overflow-wrap: anywhere : 영문/숫자 등 매우 긴 토큰만 강제 분절 허용
 * - vertical-align: top : 행 높이가 다른 셀과 어울리도록 윗정렬
 * - line-height: 1.55 : 본문과 동일한 리듬
 * - 모바일에선 가로 스크롤로 폴백 (3열 이상 표가 좁은 화면에서 으스러지는 것 방지)
 */
.card-body .table th,
.card-body .table td {
    word-break: keep-all;
    overflow-wrap: anywhere;
    vertical-align: top;
    line-height: 1.55;
}

@media (max-width: 767.98px) {
    .card-body .table-responsive-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .card-body .table {
        min-width: 480px;
    }
}

/* :::related <slug> 카드
 * 본문 흐름 안에서 "다른 글로 이어 읽기"를 시각적으로 강조한다.
 * 좌측 4px primary 강조선 + 부드러운 배경 + 썸네일 + 화살표 CTA.
 * 마우스 오버 시 배경 톤·그림자가 살짝 강해진다.
 */
.related-link-card { display: block; }

.related-link-card > a {
    background: #fff7ef;                       /* primary(#F38734) 의 옅은 톤 */
    border-left: 4px solid #F38734;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
    color: inherit;
}

.related-link-card > a:hover,
.related-link-card > a:focus-visible {
    background: #ffe9d4;
    box-shadow: 0 4px 12px rgba(243, 135, 52, 0.18);
    transform: translateY(-1px);
    text-decoration: none;
}

.related-link-card__thumb {
    width: 100%;
    max-width: 160px;
    height: 100px;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .related-link-card__thumb {
        max-width: none;
        height: 160px;
    }
}

.related-link-card__body {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-link-card__label {
    font-size: 0.78rem;
    color: #F38734;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
    text-transform: none;
}

.related-link-card__title {
    font-weight: 700;
    color: #1f2733;
    font-size: 1.05rem;
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.related-link-card__meta {
    margin-top: 4px;
    font-size: 0.82rem;
    color: #6b7280;
}

.related-link-card__arrow {
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    color: #F38734;
    font-size: 1.8rem;
    font-weight: 600;
}

/* 작성자 박스 — 이니셜 아바타.
 * 이전엔 인라인 style 로 width/height/font-size 를 박았으나, 레이아웃 변경(아바타+이름 한 줄,
 * 본문·버튼 아래 행) 에 따라 클래스로 분리.
 */
.author-box__avatar {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
    /* 사진을 쓸 때 원본 비율이 56x56 정사각형으로 눌리지 않게 잘라 넣는다.
       이니셜 배지(span)일 때는 아무 영향이 없다. */
    object-fit: cover;
    object-position: center top;
}

/* 작성자 박스의 "프로필 상세 보기" 필 버튼
 * 클릭 가능한 요소임을 분명히 보여주고, URL 텍스트를 노출하지 않는다.
 * primary(#F38734) 테두리 + 옅은 배경 + 호버 시 fill 반전.
 */
.author-box .profile-link {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 7px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #F38734;
    background: #fff7ef;
    border: 1px solid #F38734;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1.3;
    transition: background 0.15s ease, color 0.15s ease,
        box-shadow 0.15s ease;
}

.author-box .profile-link:hover,
.author-box .profile-link:focus-visible {
    background: #F38734;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(243, 135, 52, 0.28);
    outline: none;
}

.author-box .profile-link__arrow {
    margin-left: 8px;
    font-weight: 700;
    transition: transform 0.15s ease;
}

.author-box .profile-link:hover .profile-link__arrow,
.author-box .profile-link:focus-visible .profile-link__arrow {
    transform: translateX(2px);
}

/* 리스팅 카드 높이 통일 (2026-08-12) — 제목이 1줄/2줄로 갈리면 카드 높이가 어긋나
 * 목록이 들쭉날쭉해지는 문제. 제목 영역을 항상 2줄 높이로 예약하고, 2줄을 넘는
 * 제목은 말줄임 처리한다(전문은 DOM 과 상세 페이지에 그대로 있어 SEO 무관). */
#postGrid .card-style4 h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.45;
    min-height: 2.9em;
}

/* 판정 순서도 (:::flow) — 판정 표의 시각화 보조. 2026-08-12 사무소 확정 디자인 A′
 * 「결정 사다리형」: 질문 스파인 왼쪽(열 비율 1.15, 물음표 필수·가운데 정렬),
 * 예=주황 가로 화살표 → 오른쪽 결과(열 비율 0.85), 아니오=슬레이트 수직 화살표로
 * 다음 질문에 연결, 마지막 아니오만 종착 박스. 표가 기계 가독의 정본이고 이 블록은
 * 완독 지점의 독자용 표현이다. DOM 이 텍스트라 크롤링에도 잡힌다. */
.post-flow {
    max-width: 640px;
    margin: 0 auto 1.5rem;
}

.post-flow__row {
    display: grid;
    grid-template-columns: 1.15fr 56px 0.85fr;
    align-items: center;
}

.post-flow__q {
    background: #fff;
    border: 1.5px solid #F38734;
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 600;
    color: #1c2733;
    text-align: center;
    line-height: 1.5;
}

.post-flow__conn {
    position: relative;
    height: 2px;
    background: #F38734;
    margin-right: 9px;
}

.post-flow__conn::after {
    content: "";
    position: absolute;
    right: -9px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 9px solid #F38734;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.post-flow__conn .post-flow__tag {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.post-flow__yes {
    background: #fff7ef;
    border: 1px solid #ffd9b8;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

.post-flow__no {
    position: relative;
    width: calc(57.5% - 32px);
    height: 52px;
}

.post-flow__no::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 2px;
    bottom: 9px;
    width: 2px;
    background: #5a6b7d;
    transform: translateX(-50%);
}

.post-flow__no::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-top: 9px solid #5a6b7d;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.post-flow__no .post-flow__tag {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.post-flow__end {
    width: calc(57.5% - 32px);
    background: #f6f8fb;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.5;
}

.post-flow__tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: #F38734;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.post-flow__tag--no {
    background: #5a6b7d;
}

@media (max-width: 480px) {
    .post-flow__row {
        grid-template-columns: 1.15fr 34px 0.85fr;
    }

    .post-flow__no,
    .post-flow__end {
        width: calc(57.5% - 20px);
    }
}

/* 저자 카드 CTA (2026-08-11 사무소 확정) — 이름 줄 + 경험 소개 2줄 + 분야별 문의 버튼.
 * 버튼은 카드 오른쪽(좁은 화면에선 아래 전폭). 문구는 config.yaml categories.N.cta_bio /
 * cta_button. 구형 글의 .author-box(모디파이어 없음)에는 영향 없음 — 재렌더 시에만 바뀐다. */
.author-box--cta {
    background: #fff7ef;
    border: 1px solid #ffd9b8;
    border-radius: 10px;
    padding: 20px;
}

.author-box__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* 이름·소개 블록이 남는 폭을 흡수해, 버튼 문구가 길어도(카테고리별 상이) 줄이 깨지지 않게 */
.author-box__row > div {
    flex: 1 1 auto;
    min-width: 0;
}

.author-box__btn {
    display: inline-block;
    margin-left: auto;
    flex-shrink: 0;
    padding: 9px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #F38734;
    border-radius: 6px;
    text-decoration: none;
    line-height: 1.3;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.author-box__btn:hover,
.author-box__btn:focus-visible {
    background: #d06a1a;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(243, 135, 52, 0.28);
    outline: none;
}

@media (max-width: 575.98px) {
    .author-box--cta .author-box__btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* ══ 질문 스택형 표준 포맷 블록 (2026-08-11 도입) ══
 * 렌더러의 :::summary / :::callout / :::calc / :::cta / :::sources 가 사용.
 * 브랜드 키컬러 #F38734 계열 — related-link-card 와 같은 톤. */

.post-summary { background: #fff7ef; border-left: 4px solid #F38734; border-radius: 6px; padding: 16px 18px; }
.post-summary__title { font-weight: 700; color: #F38734; margin-bottom: 8px; font-size: 0.9rem; }
.post-summary ul { padding-left: 1.1rem; margin-bottom: 0; }
.post-summary li { margin-bottom: 4px; }

.post-callout { background: #f6f8fb; border-left: 4px solid #8ba3bd; border-radius: 6px; padding: 14px 18px; }
.post-callout__label { font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; color: #4a6076; }
.post-callout--warn { background: #fdf3ec; border-left-color: #F38734; }
.post-callout--warn .post-callout__label { color: #d06a1a; }

.post-cta { background: #fff; border: 2px dashed #F38734; border-radius: 8px; padding: 14px 18px;
    font-weight: 600; font-size: 1.02rem; }
.post-cta a { color: #F38734; }
.post-cta .ti-angle-double-right { color: #F38734; }

.post-calc { background: #1c2733; color: #dfe7ef; border-radius: 8px; padding: 16px 20px; font-size: 0.95rem; }
.post-calc__title { color: #ffd9b8; font-weight: 700; margin-bottom: 10px; font-size: 0.88rem; }
.post-calc__row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15); }
.post-calc__row--result { border-bottom: 0; padding-top: 9px; font-size: 1.05rem; color: #fff; }
.post-calc__row--result strong { color: #F38734; font-size: 1.15rem; }

.post-sources { background: #f6f8fb; border-radius: 6px; padding: 12px 16px; font-size: 0.85rem; color: #5a6b7d; }
.post-sources__title { font-weight: 700; margin-bottom: 4px; color: #1c2733; }

/* 근거 블록 접기 (2026-08-17 사무소) — 조문 전수 기재로 블록이 길어져 3번째 줄부터 접는다.
   ⚠ 자바스크립트를 쓰지 않는다. 접힘은 **시각 처리일 뿐 DOM 에는 전문이 남아** 검색엔진과
     AI 답변엔진이 조문을 전부 읽는다. details 로 감싸면 닫힌 상태에서 내용이 사라진다.
   ⚠ 체크박스는 display:none 으로 숨기지 않는다 — 그러면 키보드 포커스를 못 받아
     펼칠 수 없다. 화면에서만 지우는 sr-only 방식으로 둔다. */
.post-sources__check { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.post-sources__body { display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.post-sources__check:checked ~ .post-sources__body { display: block; -webkit-line-clamp: none;
    line-clamp: none; overflow: visible; }
.post-sources__more { display: inline-block; margin-top: 7px; padding: 1px 2px; color: #1f3864;
    font-weight: 600; font-size: 0.83rem; cursor: pointer; user-select: none; }
.post-sources__more:hover { text-decoration: underline; }
.post-sources__more--open::after { content: " ▾"; }
.post-sources__more--close { display: none; }
.post-sources__more--close::after { content: " ▴"; }
.post-sources__check:checked ~ .post-sources__more .post-sources__more--open { display: none; }
.post-sources__check:checked ~ .post-sources__more .post-sources__more--close { display: inline; }
/* 키보드로 체크박스에 포커스가 갔을 때 라벨에 초점 표시 — 마우스 클릭에는 나타나지 않는다 */
.post-sources__check:focus-visible ~ .post-sources__more { outline: 2px solid #1f3864;
    outline-offset: 2px; border-radius: 3px; }
@media print {
    .post-sources__body { display: block !important; -webkit-line-clamp: none !important;
        line-clamp: none !important; overflow: visible !important; }
    .post-sources__more { display: none; }
}

/* ──────────────────────────────────────────────────────────────
   홈 히어로 배경 영상의 레이아웃 이동 차단 (2026-08-25 SEO 감사 P1)

   jarallax-video 플러그인이 로드 3초쯤 뒤 <iframe id="VideoWorker-0"> 를
   문서에 넣는다. 플러그인이 인라인 스타일로 위치를 잡아 주기까지의 짧은
   순간에 iframe 이 일반 흐름에 참여하면 그 아래 전체가 밀린다 —
   감사 실측 CLS 0.7073(기준 0.1)이 이 단일 이벤트였다.

   아래 두 규칙은 타이밍과 무관하게 성립한다.
     ① iframe 은 파싱되는 순간부터 흐름 밖(absolute)에 있다.
     ② 히어로 높이가 JS 가 아니라 CSS 로 먼저 확정된다.
   영상·포스터 이미지의 겉모습은 그대로다.
   ⚠ jarallax 가 넣는 인라인 스타일보다 뒤에 적용되어야 하므로
     !important 가 필요하다. 이 선택자는 플러그인이 만든 요소에만 걸린다.
   ────────────────────────────────────────────────────────────── */
[id^="VideoWorker-"] {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

section.jarallax.video-banner {
    position: relative;
    min-height: 100vh;
}
