/* 공용 부품 — 쉬운 화면(site.css 다음)·전문가 화면(lab.css 다음)이 함께 싣는다. 개편 A 소유(STYLE_ALIGN.md, 2026-09-26).
   개편 B·C 는 이 클래스를 쓰기만 하고 고칠 일이 있으면 개편 A(메인 경유)에 요청한다.
   판정 배지 .badge.{pass,pass-nobp,nd,bad,sub10,na,fail,post} · 이름 칩 .nchip · bp 미표기 .nobp · ⓘ .gi/.gi-d · 도서 팝업 .bk-* · 결과 카드 .rc/.rcs */
/* ── 공용 부품(개편 A, STYLE_ALIGN.md 2026-09-26) — 쉬운 화면·전문가 화면(lab.css 에 같은 규칙)·개편 B·C 가 같이 쓴다 ── */
/* 판정 배지(모서리 6px 네모) — 이름 칩(알약)과 모양으로 구분한다. 여섯 가지 판정 말(개편 B 요청 2026-09-27):
   .pass 통과 · .pass-nobp 통과—bp 미표기(p4_amend2, 빗금) · .nd 구분 안 됨 · .bad 더 나쁨 · .sub10 10bp 미만 · .na 판정 대상 아님
   (+ .fail 불통과 · .post 사후 분석 — 등록 판정을 바꾸지 않음) */
.badge.pass { background: var(--ret-accent-soft, #e3f2f1); color: var(--ret-accent-ink, #0a5152); border: 1px solid var(--ret-accent-line, #a9d3cf); }
.badge.pass-nobp { background: repeating-linear-gradient(45deg, var(--ret-accent-soft, #e3f2f1) 0 5px, #fff 5px 10px); color: var(--ret-accent-ink, #0a5152); border: 1px solid var(--ret-accent-line, #a9d3cf); }
.badge.nd { background: #fff; color: #5b6475; border: 1px dashed #b9c2d3; }
.badge.bad { background: #fbeaea; color: #a12626; border: 1px solid #efc2c2; }
.badge.sub10 { background: #f4f6f9; color: #4a5263; border: 1px solid #d9dde7; }
.badge.na { background: transparent; color: #8a93a3; border: 1px solid transparent; font-weight: 600; }
.badge.fail { background: #eef1f6; color: #4a5263; border: 1px solid #d9dde7; }
.badge.post { background: #faf5e8; color: #7a5a14; border: 1px solid #e3cd94; }
/* 이름 칩 — 책 사이트(book5/tools/build_site.py)와 같은 칩. 표시 이름은 data/ko/names_ko.json(결과 키 → 이름) */
.nchip { display: inline-block; font-size: .9em; font-weight: 600; line-height: 1.45; color: #123f9e; background: #eaf2fd; border: 1px solid #bcd3f5; border-radius: 999px; padding: 1px 9px; margin: 0 1px; white-space: nowrap; }
table .nchip { font-size: 13px; }
html[lang="en"] table .nchip, html[lang="es"] table .nchip { font-size: 14px; }   /* 영어·스페인어판은 칩 이름이 길고 표 칸에 많이 들어가 14px(E-C 요청 2026-09-27) — 한국어판은 그대로 */
/* 버튼·탭·세그먼트 안의 이름 칩은 글자만 — 선택된 버튼 안에 알약이 한 겹 더 그려지지 않게, 색은 버튼을 따른다(사용자 지시 2026-09-27).
   .nchip.nchip 은 위 표 칸 규칙(html[lang] table .nchip)보다 우선하려는 것. 이름 설명은 칩의 title 그대로 */
html :is(button, [role="tab"], [role="radio"], [aria-pressed], [aria-selected]) .nchip.nchip { display: inline; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; color: inherit; font: inherit; }
/* bp 미표기 칸(p4_amend2: bp_reported=false) — 칸에 빗금, 숫자 대신 확률 변화. <td class="nobp"> 또는 <span class="nobp"> */
.nobp { color: #5b6475; font-size: 13px; background: repeating-linear-gradient(45deg, #eef1f6 0 5px, #fff 5px 10px); }
span.nobp { border-radius: 4px; padding: 0 4px; }
/* ⓘ 칸 설명 → AI 안내 패널(window.GUIDE_OPEN, /start 와 같은 단추). 클릭 처리는 assets/mode.js */
.gi { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; min-height: 26px; padding: 0 4px; margin-left: 2px; border: 1px solid #d9dde7; border-radius: 999px; background: #fff; color: var(--ret-accent, #0e6b6b); font-family: inherit; font-weight: 700; font-size: 13px; line-height: 1; cursor: pointer; vertical-align: middle; }
/* 글자 ⓘ(U+24D8)는 Pretendard 에 없다 — 단추 글자는 숨기고 테두리 원 안에 같은 글꼴의 'i' 를 그린다(폴백 글꼴이 화면에 나오지 않게, 2026-09-27). 읽는 이름은 aria-label */
.gi { font-size: 0 !important; }
.gi::before { content: "i"; font-size: 13px; font-weight: 700; line-height: 1; }
.gi-d { background: rgba(159,209,203,.14); border-color: rgba(159,209,203,.45); color: #fff; }
.gi:focus-visible { outline: 2px solid #ffc766; outline-offset: 2px; }
/* 머리 "책" 단추 — 포털 머리의 도서 목록 단추와 같은 모양 */
nav.menu .books-btn { border: 1px solid #d9dde7; background: #fff; color: #12161f; border-radius: 7px; padding: 3px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 30px; align-self: center; }
nav.menu .books-btn:hover { border-color: var(--ret-accent, #0e6b6b); color: var(--ret-accent, #0e6b6b); }
/* 도서 목록 팝업(assets/books.js) — 포털 booksModal·법인 사이트와 같은 목록, 이 사이트 색 */
.bk-modal { position: fixed; inset: 0; z-index: 50; background: rgba(10,16,32,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.bk-card { width: min(720px, 100%); max-height: 86vh; overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(10,20,50,.35); padding: 16px 18px 18px; color: #12161f; }
.bk-head { display: flex; align-items: baseline; gap: 10px; }
.bk-head h2 { margin: 0; font-size: 17px; flex: 1; }
.bk-x { border: 0; background: none; color: #5b6475; font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.bk-x:hover { background: #f2f4f9; color: #12161f; }
.bk-note { margin: 2px 0 10px; color: #5b6475; font-size: 13px; }
.bk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bk-series { font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--ret-accent-ink, #0a5152); border-bottom: 1px solid var(--ret-accent-line, #a9d3cf); padding: 4px 0 6px; margin-top: 4px; }
.bk { display: flex; gap: 14px; }
.bk-cov { flex: none; width: 72px; height: 104px; object-fit: cover; border-radius: 4px; border: 1px solid #d9dde7; background: #eef1f6; display: block; }
.bk-none { background: repeating-linear-gradient(45deg,#e3f2f1 0 6px,#f5f8f8 6px 12px); }
.bk-body { min-width: 0; flex: 1; }
.bk-ser { color: #5b6475; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.bk-title { font-size: 15.5px; font-weight: 800; margin-top: 2px; }
.bk-sub { color: var(--ret-accent, #0e6b6b); font-size: 13px; font-weight: 600; margin-top: 1px; }
.bk-blurb { margin: 6px 0 8px; color: #5b6475; font-size: 13px; line-height: 1.5; }
.bk-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.bk-links a { display: inline-block; border: 1px solid #d9dde7; border-radius: 6px; padding: 4px 10px; color: #12161f; text-decoration: none; font-weight: 700; }
.bk-links a:hover { border-color: var(--ret-accent, #0e6b6b); color: var(--ret-accent, #0e6b6b); }
.bk-links a.go { background: var(--ret-accent, #0e6b6b); border-color: var(--ret-accent, #0e6b6b); color: #fff; }
.bk-links .soon { border: 1px dashed #d9dde7; border-radius: 6px; padding: 4px 10px; color: #5b6475; }
.bk-other { color: #5b6475; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bk-fam { --fam-bg:#fff; --fam-fg:#12161f; --fam-line:#d9dde7; --fam-hover:rgba(0,0,0,.06); margin-top: 14px; padding-top: 12px; border-top: 1px solid #d9dde7; font-size: 13px; color: #5b6475; text-align: center; }
/* 결과 카드(가족 자산·BOOK 2) */
.rc { background: #fff; border: 1px solid #d9dde7; border-top: 4px solid #c9a24a; border-radius: 12px; padding: 14px; }
.rc h3 { margin: 0 0 4px; font-size: 16px; }
.rc .q { color: #5b6475; font-size: 14px; margin: 0 0 8px; }
.rc .src, .rc .nt { color: #5b6475; font-size: 13px; margin: 8px 0 0; }
.rc table.t { margin-top: 6px; }
.rcs { display: grid; gap: 12px; margin: 12px 0; }
.rcs > .rc { min-width: 0; }   /* 카드 안 표가 휴대폰에서 칸을 늘리지 않게(개편 B 요청 2026-09-27) */
@media (min-width: 980px) { .rcs { grid-template-columns: 1fr 1fr; } }

/* 패밀리 사이트 드롭다운 — 바닥 연락처 옆(사용자 지시 2026-09-27: 머리·도서 팝업에서 뺌). 목록은 위로 펼친다(family.js) */
footer .sib, footer .lx-fam { display: inline-block; margin: 0; vertical-align: baseline; --fam-bg:#fff; --fam-fg:#12161f; --fam-line:#d9dde7; --fam-hover:rgba(0,0,0,.06); }
/* 버튼 한 겹, 키는 옆 링크 줄과 같게(사용자 지시 2026-09-27 "두께 조정", 포털도 같은 값). site.css 의 일반 details 카드(흰 바탕·테두리·8px 12px)가
   겹쳐 두 겹이 되던 것을 끄고, summary 만 테두리 버튼으로 둔다. 글자 13px·줄높이 18px + 세로 2px + 테두리 1px = 24px */
footer .sib .famsites, footer .lx-fam .famsites { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; box-shadow: none; font-size: 13px; color: inherit; vertical-align: middle; }
footer .sib .famsites > summary, footer .lx-fam .famsites > summary { display: inline-flex; align-items: center; gap: .45em; padding: 2px 10px; border: 1px solid #c9ced9; border-radius: 6px;
  background: #fff; color: inherit; font-size: 13px; font-weight: 400; line-height: 18px; opacity: 1; }
footer .sib .famsites > summary:hover, footer .lx-fam .famsites > summary:hover, footer .sib .famsites[open] > summary, footer .lx-fam .famsites[open] > summary { border-color: #8a93a6; color: #12161f; }
footer .sib .famsites ul, footer .lx-fam .famsites ul { left: auto; right: 0; }
@media (max-width: 600px) { footer .sib, footer .lx-fam { display: block; margin-top: 6px; } footer .sib .famsites ul, footer .lx-fam .famsites ul { right: auto; left: 0; } }   /* 좁은 화면: 연락처 줄 바로 아래 첫머리 — 목록이 화면 안에서 열린다 */

/* ── 휴대폰(폭 480px 이하) 다듬기 (W1001-07, 2026-10-01) — 이 96쪽이 모두 싣는 공용 파일 한 곳에서만 고친다.
   측정(375·390·414, 서버 브라우저): 가로 넘침 = .badge 줄바꿈 금지(es 3쪽) · 글자 16px 미만(표 칸·이름 칩·작은 글) ·
   터치 44px 미만(칩·메뉴·단계 탭·바닥 링크) · 상단 메뉴 3줄 → ☰ 로 접음(단추는 mode.js 가 넣는다) ── */
.mb-tog { display: none; }
@media (max-width: 480px) {
  .badge, .nchip { white-space: normal; max-width: 100%; }   /* 긴 이름 칩(en·es 판정 대장)이 16px 에서 418px 로 넘쳤다 — 재측정 10/1 */
  .mb-tog { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 14px;
            border: 1px solid #d9dde7; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; font-weight: 600; color: inherit; cursor: pointer; }
  .mb-tog::after { content: "▾"; font-size: 14px; opacity: .7; }
  .mb-tog[aria-expanded="true"]::after { content: "▴"; }
  header.top .mb-tog { margin-left: auto; }
  header.top nav.menu.mb-folded { display: none; width: 100%; flex-direction: column; gap: 0; margin: 4px 0 0; }   /* 단추가 붙은 뒤에만 접는다 */
  header.top nav.menu.mb-folded.mb-open { display: flex; }
  header.top nav.menu.mb-folded > :not(a):not(.expert) { align-self: flex-start; margin: 8px 4px; }   /* '책' 단추 등은 왼쪽 정렬 */
  header.top nav.menu a, header.top nav.menu .expert { display: flex; align-items: center; min-height: 44px; font-size: 16px; padding: 0 4px; border-top: 1px solid #eef0f4; }
  .mb-tog.steps { width: 100%; margin: 0 0 8px; }
  nav.lx-steps.mb-folded { display: none; }
  nav.lx-steps.mb-folded.mb-open { display: flex; flex-direction: column; gap: 6px; }
  nav.lx-steps a { display: flex; align-items: center; min-height: 44px; font-size: 16px; }
  .chip, .lx-app, .lx-lang a, .lx-lang button, footer.legal .ln a { min-height: 44px; display: inline-flex; align-items: center; }
  summary { min-height: 44px; }
  .lx-apps { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }   /* 앱 탭 줄은 가로로 밀어 보는 줄 — 끝을 흐리게(검수 메모 10/1) */
  /* 글자 16px — 전문가 화면(lab.css·family.css·fund.css)의 더 좁은 선택자가 이기므로 이 휴대폰 묶음에서만 !important */
  td, th, .nchip, small, dt, dd, li, .badge, .k, p.sm, p.ln a, .lx-strip span, footer.legal, footer.legal a { font-size: 16px !important; }
}

/* 1018 FINAL4: 인트로가 크게 보이는 동안의 헤더(언어 버튼·메뉴 ▾·전문가 화면) — mode.js 가 header.top 에 hm-on 을 붙인다 */
header.top { position: relative; }
.hm { display: none; }
header.top.hm-on .hm { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
header.top.hm-on > nav.menu { display: none !important; }
header.top.hm-on.hm-open > nav.menu { display: flex !important; flex-direction: column; flex-wrap: nowrap; gap: 0; position: absolute; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid #d9dde7; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px 16px; margin: 0; width: auto; min-width: 190px; }
header.top.hm-on.hm-open > nav.menu a, header.top.hm-on.hm-open > nav.menu .books-btn { padding: 0; min-height: 40px; display: flex; align-items: center; color: #12161f; font-size: 15px; }
header.top.hm-on.hm-open > nav.menu .books-btn { border: 0; background: none; justify-content: flex-start; border-radius: 0; }
header.top.hm-on > nav.menu .expert, header.top.hm-on .mb-tog { display: none !important; }
.hm-lg { display: inline-flex; gap: 5px; }
.hm-lg a { border: 1px solid #d9dde7; background: #fff; color: #5b6475; border-radius: 6px; padding: 3px 9px; font-size: 12px; text-decoration: none; min-height: 28px; display: inline-flex; align-items: center; }
.hm-lg a[aria-current="true"] { background: var(--ret-accent, #0e6b6b); border-color: var(--ret-accent, #0e6b6b); color: #fff; font-weight: 700; }
.hm-mt { border: 1px solid #d9dde7; background: #fff; color: #12161f; border-radius: 6px; padding: 3px 10px; font: inherit; font-size: 12.5px; min-height: 28px; cursor: pointer; }
header.top .hm-ex { font-size: 12.5px; white-space: nowrap; color: var(--muted, #5b6475); text-decoration: underline; padding: 0; min-height: 0; display: inline; }
@media (max-width: 480px) { header.top.hm-on .hm { width: 100%; margin-left: 0; } header.top.hm-on.hm-open > nav.menu { left: 0; right: 0; } }

/* 1018 FINAL5: 인트로가 크게 보이는 동안 헤더 = 인트로와 같은 어두운 색(패밀리 인트로처럼). html.cv-big 은 home.html 인라인 스크립트가 일찍 붙이고 mode.js 가 건너뛰기·로고에 맞춰 바꾼다 */
html.cv-big header.top { margin-top: -12px; padding: 12px 0 8px; background: #0a1c24; box-shadow: 0 0 0 100vmax #0a1c24; clip-path: inset(0 -100vmax); }
@media (min-width: 980px) { html.cv-big header.top { margin-top: -16px; padding-top: 16px; } }
html.cv-big header.top .logo, html.cv-big header.top .logo b { color: #fff; }
html.cv-big header.top .logo b { text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; }
html.cv-big .hm-lg a { background: transparent; border-color: rgba(255,255,255,.3); color: #c5d3ee; }
html.cv-big .hm-lg a[aria-current="true"] { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.6); color: #fff; font-weight: 700; }
html.cv-big .hm-mt { background: transparent; border-color: rgba(255,255,255,.3); color: #c5d3ee; }
html.cv-big header.top .hm-ex { color: #cfe0ff; }
