/* 자주 묻는 질문(faq.html) · 일상청소 꿀팁 문답(tips.html) 공통
   site.css 다음에 불러옵니다. 색과 글꼴은 site.css의 변수를 그대로 씁니다. */

/* 머리말 메뉴: 지금 보고 있는 페이지 표시 */
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--forest); font-weight: 600; }

/* 페이지 머리 */
.qa-hero { background: var(--white); border-bottom: 1px solid var(--line); padding: 44px 0 40px; }
.qa-hero .wrap { display: grid; gap: 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.qa-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.qa-hero .lead { max-width: 64ch; font-size: 17px; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.byline b { color: var(--ink); font-weight: 600; }
.qa-switch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.qa-switch .btn { min-height: 42px; padding: 0 16px; font-size: 15px; }

/* 본문: PC는 왼쪽 목차 + 오른쪽 문답 */
.qa-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 88px; }
.qa-toc { position: sticky; top: 94px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14.5px; }
.qa-toc h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.qa-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.qa-toc a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--muted); transition: background-color .15s, color .15s; }
.qa-toc a:hover { background: var(--white); color: var(--ink); }
.qa-toc a[aria-current="true"] { background: var(--forest); color: var(--white); }
.qa-toc small { font-variant-numeric: tabular-nums; opacity: .75; }

.qa-cat { scroll-margin-top: 90px; }
.qa-cat + .qa-cat { margin-top: 64px; }
.qa-cat > h2 { font-size: clamp(22px, 2.6vw, 28px); padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.qa-cat > .cat-lead { color: var(--muted); margin-top: 12px; max-width: 64ch; }

/* 문답 한 개 */
.qa { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; display: grid; gap: 12px; }
.qa h3 { font-size: 20px; display: flex; gap: 10px; }
.qa h3::before { content: "Q"; flex: none; color: var(--breeze-ink); font-weight: 800; }
.qa-a { display: grid; gap: 12px; padding-left: 26px; max-width: 72ch; }
.qa-a p, .qa-a ol, .qa-a ul { margin: 0; }
.qa-a .short { font-size: 17px; font-weight: 600; color: var(--forest-deep); background: var(--white); border-left: 4px solid var(--forest); padding: 12px 16px; border-radius: 0 6px 6px 0; }
.qa-a ol, .qa-a ul { padding-left: 1.3em; display: grid; gap: 6px; }
.qa-a li::marker { color: var(--forest); font-weight: 700; }
.qa-a h4 { margin: 4px 0 0; font-size: 15.5px; font-weight: 700; }
.qa-a .warn { background: #fbf3e8; border: 1px solid var(--sand); border-radius: 6px; padding: 10px 14px; font-size: 15px; }
.qa-a .warn b { color: #8a5a22; }
.qa-a .field { font-size: 15px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.qa-a .field b { color: var(--ink); }
.qa-a table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--white); }
.qa-a th, .qa-a td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.qa-a th { background: var(--stone); font-weight: 600; white-space: nowrap; }
.qa-more { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14.5px; }
.qa-more a { color: var(--forest); text-underline-offset: 3px; }

/* 맨 아래 상담 안내 */
.qa-cta { margin-top: 64px; background: var(--forest); color: var(--white); border-radius: 10px; padding: 32px clamp(20px, 4vw, 40px); display: grid; gap: 14px; }
.qa-cta h2 { font-size: clamp(22px, 2.6vw, 28px); }
.qa-cta p { color: #dfe6d6; max-width: 60ch; }
.qa-cta .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.qa-cta .btn-line { color: var(--white); }
.qa-cta .btn-line:hover { background: rgba(255,255,255,.1); }

/* 홈 아래쪽 '자주 묻는 질문' 바로가기 (index.html) */
.qa-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qa-links a { display: grid; gap: 6px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.qa-links b { font-size: 19px; }
.qa-links span { color: var(--muted); font-size: 15px; }
@media (hover: hover) { .qa-links a:hover { border-color: var(--forest); transform: translateY(-3px); box-shadow: var(--lift); } }

@media (max-width: 960px) {
  .qa-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 0; }
  /* 휴대폰·태블릿: 목차는 위쪽에 가로로 미는 분류 버튼 */
  .qa-toc { position: sticky; top: 70px; z-index: 5; max-height: none; overflow: visible; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); }
  .qa-toc h2 { display: none; }
  .qa-toc ol { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .qa-toc ol::-webkit-scrollbar { display: none; }
  .qa-toc a { white-space: nowrap; border: 1px solid var(--line); background: var(--white); padding: 7px 12px; }
  .qa-toc small { display: none; }
}
@media (max-width: 640px) {
  .qa-links { grid-template-columns: minmax(0, 1fr); }
  .qa-hero { padding: 32px 0 28px; }
  .qa h3 { font-size: 18px; }
  .qa-a { padding-left: 0; }
  .qa-a .short { font-size: 16px; }
  .qa-a th { white-space: normal; }
}

/* 화면에는 숨기고 화면낭독기에는 읽히는 글 (표 제목 등) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
