/* Shared FAQ (src/lib/faq.mjs), 2026-10-13: every page FAQ section and the /faq/ page. The old page-scoped copies
   (ghq, syp-faq, pr-faq) were folded into this file the same day. */

.faq { padding: clamp(72px, 7vw, 120px) 0; }
.faq--tint { background: #f6f9f8; }
.faq--white { background: #fff; }
.faq__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.faq__more { margin-top: 14px; font-size: 15px; line-height: 1.6; color: var(--ink-3); }
.faq__more a, .faq .qa__a a, .faq-page .qa__a a { color: var(--green-text); text-decoration: underline; text-underline-offset: 3px; }
.faq__list { display: grid; gap: 10px; }
.faq .qa, .faq-page .qa { border-radius: 14px; background: #fff; border: 1px solid #e3e9ef; box-shadow: 0 1px 2px rgba(15, 23, 39, .03); }
.faq .qa[open], .faq-page .qa[open] { border-color: #cfe8d6; box-shadow: 0 18px 36px -28px rgba(20, 90, 55, .5); }
.faq .qa summary, .faq-page .qa summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 14px 18px; cursor: pointer; list-style: none; }
.faq .qa summary::-webkit-details-marker, .faq-page .qa summary::-webkit-details-marker { display: none; }
.faq .qa summary h3, .faq-page .qa summary h3 { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.faq .qa__i, .faq-page .qa__i { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #f1f5f9; }
.faq .qa__i::before, .faq .qa__i::after, .faq-page .qa__i::before, .faq-page .qa__i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.8px; border-radius: 2px; background: var(--ink-2); transform: translate(-50%, -50%); transition: transform .2s var(--ease); }
.faq .qa__i::after, .faq-page .qa__i::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq .qa[open] .qa__i, .faq-page .qa[open] .qa__i { background: #e3f5e8; }
.faq .qa[open] .qa__i::after, .faq-page .qa[open] .qa__i::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq .qa__a, .faq-page .qa__a { padding: 0 18px 18px; }
.faq .qa__a p, .faq-page .qa__a p { font-size: 15px; line-height: 1.65; color: var(--ink-3); max-width: 70ch; }

@media (hover: hover) and (pointer: fine) { .faq .qa:not([open]):hover, .faq-page .qa:not([open]):hover { border-color: #cbd5e1; } }
@media (prefers-reduced-motion: reduce) { .faq .qa__i::before, .faq .qa__i::after, .faq-page .qa__i::before, .faq-page .qa__i::after { transition: none; } }
@media (max-width: 720px) { .faq .qa summary h3, .faq-page .qa summary h3 { font-size: 15.5px; } }

/* /faq/ page: topic index on the left (sticky on desktop), groups on the right. */
.faq-page { padding: clamp(56px, 6vw, 96px) 0 clamp(72px, 7vw, 120px); background: #f6f9f8; }
.faq-page__in { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.faq-toc { position: sticky; top: 96px; }
.faq-toc h2 { font-size: 15px; font-weight: 600; color: var(--ink); }
.faq-toc ol { list-style: none; display: grid; gap: 2px; margin-top: 12px; }
.faq-toc a { display: block; padding: 8px 12px; border-radius: 10px; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.faq-toc a:hover, .faq-toc a:focus-visible { background: #e9f3ee; color: var(--ink); }
.faq-groups { display: grid; gap: clamp(40px, 4vw, 56px); }
.faq-group { scroll-margin-top: 96px; }
.faq-group h2 { margin-bottom: 16px; font-size: clamp(24px, 2vw, 30px); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
.faq-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.faq-more a { display: block; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid #e3e9ef; text-decoration: none; }
.faq-more a:hover, .faq-more a:focus-visible { border-color: #cfe8d6; }
.faq-more b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.faq-more span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }

@media (max-width: 1100px) {
  .faq__in, .faq-page__in { grid-template-columns: minmax(0, 1fr); }
  .faq-toc { position: static; }
  .faq-toc ol { display: flex; flex-wrap: wrap; gap: 6px; }
  .faq-toc a { padding: 8px 12px; background: #fff; border: 1px solid #e3e9ef; font-size: 14px; }
}
