/* ============ 실무 가이드 페이지 전용 ============
   style.css 위에 얹는다. 가이드 페이지에서만 불러오므로 기존 페이지에는 영향이 없다. */

.g-meta { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.92rem; color: rgba(255,255,255,0.55); }
.g-meta b { color: var(--text-dim); font-weight: 600; margin-right: 0.4rem; }

/* 본문 2단: 왼쪽 목차, 오른쪽 읽기 폭 */
.g-layout {
  width: min(1160px, 92%); margin: 0 auto; padding: 5rem 0 7rem;
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4.5rem; align-items: start;
}
.g-toc { position: sticky; top: calc(var(--nav-h) + 2rem); font-size: 0.95rem; }
.g-toc p { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 1rem; }
.g-toc ol { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; border-left: 1px solid var(--line); }
.g-toc a { display: block; padding-left: 1rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-dim); line-height: 1.45; }
.g-toc a:hover { color: var(--text); border-left-color: var(--accent); }

.g-body { max-width: 760px; min-width: 0; }
.g-body > section + section { margin-top: 4.5rem; }
.g-body h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 800; line-height: 1.35; letter-spacing: -0.015em; margin-bottom: 1.3rem; }
.g-body h3 { font-size: 1.15rem; font-weight: 700; margin: 2.2rem 0 0.8rem; }
.g-body p { color: rgba(242, 242, 245, 0.8); font-size: 1.06rem; line-height: 1.85; }
.g-body p + p { margin-top: 1rem; }
.g-body .g-table-wrap + p, .g-body ul + p, .g-body ol + p { margin-top: 1.3rem; }
.g-body strong { color: var(--text); }
.g-body ul, .g-body ol.g-steps { margin-top: 1rem; padding-left: 1.2rem; color: rgba(242, 242, 245, 0.8); font-size: 1.04rem; line-height: 1.8; }
.g-body li + li { margin-top: 0.45rem; }
.g-body li::marker { color: var(--accent); }
.g-body a:not(.btn) { color: var(--accent); font-weight: 600; }
.g-body a:not(.btn):hover { text-decoration: underline; }

/* 먼저 읽는 답 */
.g-answer {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.8rem 2rem;
}
.g-answer .g-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 0.9rem; }
.g-answer ul { margin-top: 0; }

/* 표 */
.g-table-wrap { margin-top: 1.4rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.g-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; line-height: 1.6; min-width: 560px; }
.g-table th, .g-table td { padding: 0.9rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.g-table thead th { background: var(--surface); font-size: 0.88rem; font-weight: 700; color: var(--text-dim); letter-spacing: 0.02em; }
.g-table tbody th { font-weight: 700; color: var(--text); white-space: nowrap; }
.g-table td { color: rgba(242, 242, 245, 0.8); }
.g-table tr:last-child th, .g-table tr:last-child td { border-bottom: 0; }
.g-table .g-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-table .g-hi { color: var(--accent); font-weight: 700; }
.g-caption { margin-top: 0.7rem; font-size: 0.9rem; color: rgba(255,255,255,0.55); line-height: 1.6; }

/* 계산식 */
.g-formula {
  margin-top: 1.2rem; padding: 1.1rem 1.4rem; border-radius: 12px; background: var(--accent-soft);
  font-size: 1.02rem; line-height: 1.7; color: var(--text); font-variant-numeric: tabular-nums;
}

/* 보충 설명 */
.g-note { margin-top: 1.4rem; padding: 1rem 1.3rem; border-left: 2px solid var(--line); font-size: 0.97rem; color: var(--text-dim); line-height: 1.75; }
.g-note strong { color: var(--text); }

/* FAQ */
.g-faq { margin-top: 1.2rem; border-top: 1px solid var(--line); }
.g-faq details { border-bottom: 1px solid var(--line); }
.g-faq summary {
  list-style: none; cursor: pointer; padding: 1.25rem 2.2rem 1.25rem 0; position: relative;
  font-size: 1.06rem; font-weight: 700; line-height: 1.5;
}
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 1.1rem; font-size: 1.3rem; font-weight: 400; color: var(--accent); }
.g-faq details[open] summary::after { content: "−"; }
.g-faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.g-faq details p { padding: 0 0 1.4rem; }

/* 근거 규정 */
.g-sources { margin-top: 1rem; padding-left: 1.2rem; font-size: 0.93rem; color: var(--text-dim); line-height: 1.8; }

/* 관련 페이지 */
.g-related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.4rem; }
.g-related a {
  display: block; padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text) !important; font-weight: 700 !important; line-height: 1.5; transition: border-color 0.25s;
}
.g-related a span { display: block; margin-top: 0.35rem; font-size: 0.92rem; font-weight: 400; color: var(--text-dim); }
.g-related a:hover { border-color: rgba(255, 61, 61, 0.5); text-decoration: none !important; }

@media (max-width: 960px) {
  /* 1fr만 쓰면 표의 최소 폭(560px)이 열을 밀어내 모바일에서 가로 넘침이 생긴다 */
  .g-layout { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-top: 3.5rem; }
  .g-toc { position: static; padding: 1.4rem 1.5rem; background: var(--surface); border-radius: 12px; }
  .g-toc ol { border-left: 0; gap: 0.55rem; }
  .g-toc a { padding-left: 0; border-left: 0; }
}
@media (max-width: 680px) {
  .g-answer { padding: 1.5rem 1.3rem; }
  .g-related { grid-template-columns: 1fr; }
  .g-body > section + section { margin-top: 3.5rem; }
}
