/* ─────────────────────────────────────────────────────────────
   피오디맨 콘텐츠 페이지 전용 — guide.html · glossary.html · faq.html
   site.css(디자인 시스템 v2) 다음에 불러온다. 토큰·버튼·헤더·푸터는 site.css 것을 그대로 쓴다.
   규율(디자인/VEED/DESIGN.md): 흰 캔버스 · 헤어라인 #e6e6e7 · 라운드 10/16/9999 · 그림자 없음
   액센트 = 네이비 + 골드 극소량 · Pretendard 단일 · 표제 자간 -0.02em 이하
   주의: .wrap 과 같이 붙는 클래스에는 padding shorthand 를 쓰지 않는다.
   ───────────────────────────────────────────────────────────── */

/* ── 공통 ─────────────────────────────────────────── */
.page-hero .cta-row { margin-top: 28px; }
.pg-anchor, .topic, .term, .faq-panel, #best { scroll-margin-top: 96px; }
.pg-count { font-size: 13px; color: var(--muted); }
.pg-count b { color: var(--ink); font-weight: 600; }
.badge-free { display: inline-block; background: var(--mist); color: var(--ink-2); font-size: 12px; font-weight: 500; border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.badge-plus { display: inline-block; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.band-dark .cta-row { margin-top: 32px; }
.band-cta { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.band-cta .media { aspect-ratio: 3/2; background: var(--graphite); }
@media (max-width: 900px) { .band-cta { grid-template-columns: 1fr; gap: 28px; } }

/* ── 가이드: 허브 ─────────────────────────────────── */
.topic-hub { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; counter-reset: th; }
.topic-hub a { display: block; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 18px 16px; background: var(--paper); transition: border-color .15s; }
.topic-hub a:hover { border-color: var(--ink-2); }
.topic-hub a::before { counter-increment: th; content: counter(th, decimal-leading-zero); display: block; font-size: 12px; font-weight: 500; color: var(--navy); letter-spacing: 0.04em; margin-bottom: 10px; }
.topic-hub b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.016em; }
.topic-hub span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
@media (max-width: 1000px) { .topic-hub { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .topic-hub { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* ── 가이드: 본문 레이아웃(목차 + 6주제) ──────────── */
.guide-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; }
.guide-toc { position: sticky; top: 88px; display: grid; gap: 2px; }
.guide-toc a { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: var(--r-btn); border: 1px solid transparent; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.guide-toc a i { font-style: normal; font-size: 12px; color: var(--navy); width: 18px; flex: none; }
.guide-toc a:hover { color: var(--ink); }
.guide-toc a.on { background: var(--mist); border-color: var(--line); color: var(--ink); font-weight: 600; }
.guide-toc .toc-cta { margin-top: 16px; display: grid; gap: 8px; }
.guide-toc .toc-cta .btn { width: 100%; color: #fff; font-weight: 600; font-size: 13px; padding: 11px 12px; border-color: var(--navy); }
.guide-toc .toc-cta .btn.btn-ghost { color: var(--ink); border-color: var(--line); }
.guide-main { min-width: 0; }
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .guide-toc { top: 56px; z-index: 40; display: flex; gap: 6px; overflow-x: auto; background: var(--paper); margin: 0 -24px 32px; padding: 10px 24px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .guide-toc::-webkit-scrollbar { display: none; }
  .guide-toc a { flex: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 13px; }
  .guide-toc a i { display: none; }
  .guide-toc a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
  .guide-toc .toc-cta { display: none; }
  .topic { scroll-margin-top: 124px; }
}
@media (max-width: 640px) { .guide-toc { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; } }

.topic { padding-bottom: 72px; margin-bottom: 72px; border-bottom: 1px solid var(--line); }
.topic:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.topic-top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.topic-top .media { aspect-ratio: 3/2; }
.topic-top .media.sq { aspect-ratio: 1/1; max-width: 360px; justify-self: end; width: 100%; }
.topic-no { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; color: var(--navy); }
.topic h2 { font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -0.03em; margin-top: 10px; }
.topic-lead { font-size: 16px; line-height: 1.7; color: var(--muted); margin-top: 16px; }
.topic h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; margin-top: 44px; display: flex; align-items: center; gap: 10px; }
.topic h3 .n { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--navy); color: var(--navy); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0; }
.topic .body { margin-top: 12px; display: grid; gap: 12px; max-width: 760px; }
.topic .body p { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.topic .body b { color: var(--ink); }
@media (max-width: 900px) { .topic-top { grid-template-columns: 1fr; gap: 24px; } .topic-top .media { order: -1; } .topic-top .media.sq { justify-self: start; max-width: 320px; } }
@media (max-width: 640px) { .topic { padding-bottom: 56px; margin-bottom: 56px; } .topic h2 { font-size: 26px; letter-spacing: -0.025em; } .topic h3 { font-size: 18px; margin-top: 36px; } }

/* 비교표 — 좁은 화면에서는 표 안에서만 가로로 민다(페이지 가로 스크롤 없음) */
.tbl-scroll { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-card); overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--paper); }
.cmp { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 13px 16px; text-align: left; vertical-align: top; line-height: 1.55; border-bottom: 1px solid var(--line); }
.cmp thead th { background: var(--mist); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.cmp tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.cmp tbody td { color: var(--ink-2); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl-hint { display: none; font-size: 12px; color: var(--muted); margin-top: 8px; }
@media (max-width: 680px) { .tbl-hint { display: block; } }

/* 선택지 카드(종이 · 제본) — 원본이 정사각이라 1:1 박스로 자르지 않고 쓴다 */
.opt-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 16px; }
.opt-cards.four { grid-template-columns: repeat(4, 1fr); }
.opt-card { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--paper); display: flex; flex-direction: column; }
.opt-card .ph { aspect-ratio: 1/1; background: var(--mist); }
.opt-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.opt-card .tx { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.opt-card .hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.opt-card .hd b { font-size: 16px; font-weight: 600; letter-spacing: -0.016em; }
.opt-card p { font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.opt-card .pc { font-size: 12px; line-height: 1.55; color: var(--muted); }
.opt-card .pc i { font-style: normal; font-weight: 600; color: var(--navy); margin-right: 6px; }
.opt-card .fit { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (max-width: 1100px) { .opt-cards.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .opt-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
  .opt-cards, .opt-cards.four { grid-template-columns: 1fr; }
  .opt-card { flex-direction: row; align-items: flex-start; }
  .opt-card .ph { width: 104px; height: 104px; flex: none; margin: 14px 0 14px 14px; border-radius: var(--r-btn); overflow: hidden; }
  .opt-card .tx { padding: 14px; }
}

/* "자동 견적에서는" 상자 */
.in-est { margin-top: 16px; border: 1px solid var(--navy); border-radius: var(--r-card); padding: 24px; background: var(--paper); }
.in-est ul { display: grid; gap: 10px; }
.in-est li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.in-est li::before { content: ''; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--navy); }
.in-est li b { color: var(--ink); }
.in-est .cta-row { margin-top: 20px; }
@media (max-width: 640px) { .in-est { padding: 20px 18px; } }
.rel-terms { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rel-terms .k { font-size: 12px; color: var(--muted); margin-right: 4px; }
.rel-terms a { font-size: 13px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 12px; transition: border-color .15s, color .15s; }
.rel-terms a:hover { border-color: var(--navy); color: var(--navy); }

/* 계산식 요약 */
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 32px; }
.calc-grid > div { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 16px; background: var(--paper); }
.calc-grid .k { font-size: 12px; font-weight: 500; color: var(--navy); letter-spacing: 0.04em; }
.calc-grid b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.calc-grid span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .calc-grid { grid-template-columns: 1fr; } }

/* ── 용어 사전 ────────────────────────────────────── */
.gl-tools { border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; background: var(--paper); }
.gl-search { position: relative; }
.gl-search input { width: 100%; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 15px 44px 15px 46px; font-size: 16px; background: var(--paper); -webkit-appearance: none; appearance: none; transition: border-color .13s; }
.gl-search input:focus { outline: 0; border-color: var(--navy); }
.gl-search input::placeholder { color: var(--muted); }
.gl-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gl-search::before { content: ''; position: absolute; left: 17px; top: 50%; width: 13px; height: 13px; border: 1.5px solid var(--ink-2); border-radius: 50%; transform: translateY(-62%); }
.gl-search::after { content: ''; position: absolute; left: 27px; top: 50%; width: 7px; height: 1.5px; background: var(--ink-2); transform: translateY(4px) rotate(45deg); }
.gl-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--muted); display: none; }
.gl-clear:hover { background: var(--mist); color: var(--ink); }
.gl-search.has-q .gl-clear { display: block; }
.gl-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.gl-row .k { flex: none; width: 44px; padding-top: 9px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; }
.gl-row .chip-row { flex: 1; min-width: 0; }
.chip em { font-style: normal; font-weight: 400; opacity: .6; margin-left: 6px; font-size: 12px; }
.idx-row { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; }
.idx { min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--paper); font-size: 14px; font-weight: 500; color: var(--ink-2); transition: all .15s; }
.idx:hover { border-color: var(--ink-2); color: var(--ink); }
.idx.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.idx[disabled] { opacity: .35; cursor: default; border-color: var(--line); color: var(--muted); }
.gl-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 16px; flex-wrap: wrap; }
.gl-reset { font-size: 13px; font-weight: 500; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .gl-tools { padding: 16px; }
  .gl-row { flex-direction: column; gap: 6px; }
  .gl-row .k { width: auto; padding-top: 0; }
  .gl-row .chip-row { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; padding-bottom: 2px; }
  .gl-row .chip-row::-webkit-scrollbar { display: none; }
  .gl-row .chip { flex: none; }
  .idx-row { width: 100%; }
  .idx { min-width: 34px; height: 34px; }
}

.term-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.term { border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 24px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.term:target { border-color: var(--navy); }
.term .hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.term h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.term h3 small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; letter-spacing: -0.005em; }
.term .cat { flex: none; font-size: 12px; font-weight: 500; color: var(--navy); white-space: nowrap; }
.term p { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.term .more { margin-top: auto; padding-top: 4px; font-size: 13px; font-weight: 500; color: var(--ink-2); align-self: flex-start; border-bottom: 1px solid var(--line); }
.term .more:hover { color: var(--navy); border-color: var(--navy); }
.term mark { background: rgba(252, 181, 2, .35); color: inherit; border-radius: 2px; padding: 0 1px; }
@media (max-width: 800px) { .term-list { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .term { padding: 18px; } }
.gl-empty { border: 1px solid var(--line); border-radius: var(--r-card); padding: 40px 24px; text-align: center; background: var(--mist); }
.gl-empty b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.gl-empty p { font-size: 15px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.gl-empty .cta-row { justify-content: center; margin-top: 20px; }

/* 가이드로 이어지는 이미지 카드 */
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.next-card { display: block; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--paper); transition: border-color .15s; }
.next-card:hover { border-color: var(--ink-2); }
.next-card .media { border-radius: 0; aspect-ratio: 3/2; }
.next-card .tx { padding: 20px 22px 22px; }
.next-card .k { font-size: 12px; font-weight: 500; color: var(--navy); letter-spacing: 0.04em; }
.next-card b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.35; }
.next-card p { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
@media (max-width: 640px) { .next-grid { grid-template-columns: 1fr; } }

/* ── FAQ ──────────────────────────────────────────── */
.faq.wide { max-width: none; }
.faq summary { display: block; }
.faq summary .q-cat { display: block; font-size: 12px; font-weight: 500; color: var(--navy); margin-bottom: 4px; letter-spacing: 0.02em; }
.faq .a { padding: 0 0 22px; max-width: 720px; display: grid; gap: 10px; }
.faq .a p { padding: 0; }
.faq .a .a-link { font-size: 14px; font-weight: 500; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.best-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
.best-grid .faq { max-width: none; }
.best-grid .faq:nth-child(2) details:first-child { border-top: 1px solid var(--line); }
@media (max-width: 900px) { .best-grid { grid-template-columns: 1fr; } .best-grid .faq:nth-child(2) details:first-child { border-top: 0; } }

.faq-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.faq-tabs .chip { cursor: pointer; }
.faq-tabs .chip:focus-visible, .idx:focus-visible, .chip:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
@media (max-width: 640px) {
  .faq-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .faq-tabs::-webkit-scrollbar { display: none; }
  .faq-tabs .chip { flex: none; }
}
.faq-panel { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; margin-top: 32px; }
.faq-panel .side { position: sticky; top: 88px; }
.faq-panel .side .media { aspect-ratio: 3/2; }
.faq-panel .side .cap { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.faq-panel h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; margin-bottom: 20px; }
.faq-panel[hidden] { display: none; }
@media (max-width: 900px) { .faq-panel { grid-template-columns: minmax(0, 1fr); gap: 24px; } .faq-panel .side { position: static; order: -1; } }
@media (max-width: 640px) { .faq-panel h3 { font-size: 20px; } }
