/* 다음 뭐야 사용방법 — 이 페이지 전용 스타일. 접두사 gd- */

.gd { --gd-blue: #0066cc; --gd-accent: #4d96ff; word-break: keep-all; overflow-wrap: anywhere; }
.gd a:not(.btn) { color: var(--gd-blue); }
.gd a:not(.btn):hover { text-decoration: underline; }

/* 첫 화면 */
.gd-hero { padding: 0 0 clamp(28px, 4vw, 48px); }
.gd-hero .gd-kicker { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.gd-hero h1 { margin: 10px 0 0; font-size: clamp(36px, 6vw, 60px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; }
.gd-hero .gd-lead { margin: 18px 0 0; max-width: 560px; font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--muted); }
.gd-lang { margin: 18px 0 0; font-size: 15px; color: var(--muted); }

/* 자주 찾는 것 */
.gd-quick { margin: 36px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.gd-quick a:not(.btn) {
  display: block; padding: 16px 18px; border-radius: 16px; background: var(--soft);
  color: var(--fg); font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em;
  transition: background .2s;
}
.gd-quick a:not(.btn):hover { background: #ececf0; text-decoration: none; }
.gd-quick small { display: block; margin-top: 3px; font-size: 14px; font-weight: 400; color: var(--muted); }

/* 본문 2단: 목차 + 글 */
.gd-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: clamp(64px, 10vw, 120px); }
.gd-toc { position: sticky; top: 72px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 4px 0 24px; font-size: 14px; scrollbar-width: thin; }
.gd-toc p { margin: 22px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.gd-toc p:first-child { margin-top: 0; }
.gd .gd-toc a { display: block; padding: 5px 0 5px 12px; margin-left: -12px; border-left: 2px solid transparent; color: #424245; line-height: 1.35; }
.gd .gd-toc a:hover { color: var(--fg); text-decoration: none; }
.gd .gd-toc a.on { color: var(--fg); font-weight: 600; border-left-color: var(--fg); }

.gd-article { min-width: 0; max-width: 720px; }
.gd-sec { padding-top: 56px; margin-top: 8px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.gd-group + .gd-sec { border-top: 0; padding-top: 12px; margin-top: 0; }
.gd-group { margin: 72px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.gd-group:first-child { margin-top: 0; }
.gd-article h2 { margin: 6px 0 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -.03em; font-weight: 700; }
.gd-article h3 { margin: 40px 0 0; font-size: 21px; line-height: 1.3; letter-spacing: -.015em; font-weight: 650; scroll-margin-top: 64px; }
.gd-article p, .gd-article li { font-size: 17px; line-height: 1.7; }
.gd-article p { margin: 14px 0 0; }
.gd-article .gd-intro { font-size: 19px; line-height: 1.6; color: #424245; margin-top: 16px; }
.gd-article ul:not(.gd-steps) { margin: 14px 0 0; padding-left: 1.2em; }
.gd-article li + li { margin-top: 6px; }
.gd-article b, .gd-article strong { font-weight: 650; }

/* 화면에 보이는 이름 */
.gd-ui { font-weight: 650; color: var(--fg); white-space: nowrap; }
.gd-path { font-weight: 650; }
.gd-path i { font-style: normal; color: var(--muted); font-weight: 400; padding: 0 .3em; }

/* 단계 */
.gd-steps { list-style: none; counter-reset: gd; margin: 18px 0 0; padding: 0; }
.gd-steps > li { counter-increment: gd; position: relative; padding: 0 0 0 44px; margin: 0; }
.gd-steps > li + li { margin-top: 14px; }
.gd-steps > li::before {
  content: counter(gd); position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--fg); color: #fff; font-size: 14px; font-weight: 600; line-height: 28px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.gd-steps > li > p { margin: 6px 0 0; }
.gd-steps > li > p:first-child { margin-top: 0; }

/* 글 + 그림 */
.gd-row { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 32px; align-items: start; margin-top: 8px; }
.gd-row.flip { grid-template-columns: 232px minmax(0, 1fr); }
.gd-row.flip > .gd-fig { order: -1; }
.gd-fig { margin: 18px 0 0; }
.gd-fig img { display: block; width: 100%; height: auto; border-radius: 22px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.09), 0 18px 40px -20px rgba(0,0,0,.35); }
.gd-fig figcaption { margin: 12px 4px 0; font-size: 14px; line-height: 1.45; color: var(--muted); text-align: center; }
.gd-figs { margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; align-items: start; }
.gd-figs .gd-fig { margin: 0; }
.gd-figs.two { grid-template-columns: repeat(2, minmax(0, 232px)); justify-content: start; gap: 24px; }
.gd-figs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 알림 상자 */
.gd-call { margin: 22px 0 0; padding: 16px 20px; border-radius: 16px; background: var(--soft); }
.gd-call > b:first-child { display: block; margin-bottom: 2px; font-size: 14px; letter-spacing: .01em; color: var(--muted); }
.gd-call p { margin: 6px 0 0; font-size: 16px; line-height: 1.65; }
.gd-call p:first-of-type { margin-top: 0; }
.gd-call ul { margin: 8px 0 0; }
.gd-call li { font-size: 16px; }
.gd-call.warn { background: #fff4e5; }
.gd-call.warn > b:first-child { color: #9a5b00; }
.gd-call.tip { background: #eef5ff; }
.gd-call.tip > b:first-child { color: #1a5bb8; }

/* 용어 풀이 */
.gd-terms { margin: 22px 0 0; border-top: 1px solid var(--line); }
.gd-terms > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gd-terms dt { font-weight: 650; font-size: 16px; }
.gd-terms dd { margin: 0; font-size: 16px; line-height: 1.6; color: #424245; }

/* 표 */
.gd-table { width: 100%; margin: 20px 0 0; border-collapse: collapse; font-size: 16px; }
.gd-table th, .gd-table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.55; }
.gd-table th { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.gd-table td:first-child { font-weight: 650; white-space: nowrap; padding-right: 20px; }

/* 접는 질문 */
.gd-faq { margin: 18px 0 0; border-top: 1px solid var(--line); }
.gd-faq details { border-bottom: 1px solid var(--line); }
.gd-faq summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; position: relative; font-size: 17px; font-weight: 600; line-height: 1.45; }
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.gd-faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.gd-faq details > div { padding: 0 0 18px; }
.gd-faq details p, .gd-faq details li { font-size: 16px; }
.gd-faq details p:first-child { margin-top: 0; }

.gd-end { margin: 64px 0 0; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.gd-end p { font-size: 15px; margin: 6px 0 0; }

/* 좁은 화면: 목차는 위에서 옆으로 넘기는 띠로 */
@media (max-width: 900px) {
  .gd-body { display: block; }
  .gd-toc {
    position: sticky; top: var(--nav-h, 49px); z-index: 8; max-height: none; overflow-x: auto; overflow-y: hidden;
    margin: 0 -24px 28px; padding: 0 24px; display: flex; gap: 22px; white-space: nowrap;
    background: rgba(255,255,255,.88); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,.08); scrollbar-width: none;
  }
  .gd-toc::-webkit-scrollbar { display: none; }
  .gd-toc p { display: none; }
  .gd .gd-toc a { padding: 13px 0; margin: 0; border-left: 0; border-bottom: 2px solid transparent; font-size: 14px; }
  .gd .gd-toc a.on { border-left-color: transparent; border-bottom-color: var(--fg); }
  .gd-sec { scroll-margin-top: 112px; }
  .gd-article h3 { scroll-margin-top: 112px; }
}
@media (max-width: 640px) {
  .gd-row, .gd-row.flip { display: block; }
  .gd-row .gd-fig, .gd-row.flip .gd-fig { max-width: 260px; margin-left: auto; margin-right: auto; margin-top: 22px; }
  .gd-figs, .gd-figs.two, .gd-figs.three { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 22px -24px 0; padding: 0 24px 10px; scrollbar-width: none; }
  .gd-figs::-webkit-scrollbar { display: none; }
  .gd-figs .gd-fig { flex: 0 0 62%; max-width: 240px; scroll-snap-align: center; }
  .gd-terms > div { grid-template-columns: 1fr; gap: 2px; }
  .gd-article p, .gd-article li { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) { .gd-faq summary::after { transition: none; } }
