/* API · MCP 안내 문서 */

.sm-guide-page { max-width: var(--ui-content-width, 1224px); padding-top: 36px; }
.sm-guide-page > h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.02em; }
.sm-guide-page > p { margin: 0 0 8px; color: var(--sm-muted); }
.sm-guide-page code { padding: 1px 8px; border-radius: 6px; background: var(--ui-tone-86); font-size: 13px; }
.sm-guide-page .title { margin: 36px 0 8px; font-size: 22px; }
.sm-guide-page .desc { margin: 0 0 16px; color: var(--sm-muted); }
.sm-guide-page .mt-2 { margin-top: 8px; }

.subject-turf { margin: 0 0 24px; padding: 24px 24px; border: 1px solid var(--sm-line); border-radius: 14px; background: var(--ui-tone-3); }
.subject-turf h4 { margin: 0 0 8px; font-size: 18px; }
.subject-turf h5, .turf-table-tit { margin: 16px 0 8px; font-size: 15px; font-weight: 700; }
.subject-turf .sub { color: var(--sm-muted); font-size: 14px; }

.turf-table { margin: 8px 0 4px; border: 1px solid var(--sm-line); border-radius: 10px; overflow: hidden; font-size: 14px; }
.turf-table .head, .turf-table .turf-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); }
.turf-table.turf-col-3 .head, .turf-table.turf-col-3 .turf-row { grid-template-columns: 180px 110px minmax(0, 1fr); }
/* 오류 코드 표: HTTP 숫자 칸은 좁게, 영문 코드 칸은 코드 한 낱말이 꺾이지 않게 넓게(110px 에서 NOT_ALLOW/ED 로 꺾였다, 2026-11-12 실측). */
.turf-table.turf-col-3.turf-col-codes .head, .turf-table.turf-col-3.turf-col-codes .turf-row { grid-template-columns: 80px minmax(0, 280px) minmax(0, 1fr); }
.turf-table.turf-col-4 .head, .turf-table.turf-col-4 .turf-row { grid-template-columns: 160px 100px 90px minmax(0, 1fr); }
.turf-table.turf-col-clients .head, .turf-table.turf-col-clients .turf-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.turf-table .head { background: var(--ui-tone-102); font-weight: 700; }
.turf-table .head > div, .turf-table .turf-row > div { padding: 8px 12px; min-width: 0; overflow-wrap: anywhere; }
.turf-table .turf-row { border-top: 1px solid var(--sm-line); }
.turf-table .turf-row > div:first-child { font-weight: 600; }

.turf-code-area { position: relative; margin: 8px 0; }
.turf-code-area pre { margin: 0; padding: 16px 16px; border-radius: 10px; background: var(--ui-tone-129); color: var(--ui-tone-205); font-size: 13px; line-height: 1.6; overflow-x: auto; }
.turf-code-area pre code { padding: 0; background: none; color: inherit; white-space: pre; }
.ic-copy { display: none; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.tag.t-primary { background: var(--ui-tone-75); color: var(--ui-tone-74); }

@media (max-width: 640px) {
    .sm-guide-page { padding-top: 24px; }
    .sm-guide-page > h1 { font-size: 24px; }
    .subject-turf { padding: 16px 16px; }
    .turf-table .head { display: none; }
    .turf-table .turf-row, .turf-table.turf-col-3 .turf-row, .turf-table.turf-col-3.turf-col-codes .turf-row, .turf-table.turf-col-4 .turf-row, .turf-table.turf-col-clients .turf-row { grid-template-columns: minmax(0, 1fr); padding: 8px 0; }
    .turf-table .turf-row:first-of-type { border-top: 0; }
    .turf-table .turf-row > div { padding: 2px 12px; }
    .turf-table .turf-row > div:not(:first-child) { color: var(--ui-tone-80); }
}

/* 문서 배치: 넓은 화면은 왼쪽 목차 + 본문(최대 860px), 좁은 화면은 목차를 접어 위에 둔다. */
.dg-layout { display: grid; grid-template-columns: 220px minmax(0, 860px); gap: 40px; align-items: start; justify-content: center; }
.dg-toc { position: sticky; top: calc(var(--sm-header-h, 64px) + 16px); max-height: calc(100dvh - var(--sm-header-h, 64px) - 32px); overflow-y: auto; padding: 4px 0; }
.dg-toc > summary { font-weight: 700; padding: 8px 0; }
.dg-toc ol { display: grid; gap: 2px; margin: 8px 0 0; padding: 0; list-style: none; }
.dg-toc a { display: flex; align-items: center; min-height: var(--ui-control-height); padding: 4px 8px; border-left: 2px solid var(--ui-line, #e3e8f0); color: var(--sm-muted); font-size: 14px; }
.dg-toc a:hover { color: var(--sm-text); border-left-color: var(--ui-brand, var(--ui-brand)); text-decoration: none; }
.dg-toc a[aria-current="true"] { color: var(--ui-brand-dark, var(--ui-brand-dark)); border-left-color: var(--ui-brand, var(--ui-brand)); font-weight: 700; }
.dg-body { min-width: 0; }
.turf-code-area .ui-code-copy { position: absolute; top: 8px; right: 8px; z-index: var(--ui-z-raise); min-height: var(--ui-control-height); padding: 8px 12px; font-size: 13px; }
.turf-code-area pre { padding-top: 52px; }
.turf-code-area pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 960px) {
    .dg-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .dg-toc { position: static; max-height: none; border: 1px solid var(--sm-line); border-radius: 12px; padding: 4px 16px 12px; }
    .dg-toc a { min-height: 44px; }
}
