/* mcp-key-guide.css — shared by: mcp-key-guide.html, mcp-key-guide-en.html
   Extracted verbatim from the identical inline <style> blocks of those pages.
   Loads after /theme.css and /icons.css, in the exact slot the inline block held,
   so cascade order is unchanged. Colors/sizes come from theme.css tokens. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --gold: #B8922D; --purple: var(--brand-500);
    --green: var(--brand-600); --red: #C45454;
    --bg-dark: var(--neutral-950); --bg-card: var(--neutral-900);
    --text-primary: var(--neutral-100); --text-secondary: var(--neutral-400);
    --border: rgb(var(--brand-600-rgb) / 0.2);
    --code-bg: rgba(0,0,0,0.35);
}
body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--neutral-950) 0%, var(--neutral-900) 50%, var(--neutral-800) 100%);
    min-height: 100vh; color: var(--text-primary);
}
body:not(.dark-mode) {
    background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-200) 50%, var(--neutral-400) 100%);
    color: var(--neutral-900); --text-primary: var(--neutral-900); --text-secondary: var(--neutral-600);
    --bg-card: #ffffff; --border: var(--neutral-200); --code-bg: var(--neutral-50);
}
.wrap { max-width: 860px; margin: 0 auto; padding: 40px 20px 80px; position: relative; z-index: 1; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: var(--text-3xl); font-weight: 800; display: flex; align-items: center; gap: 10px; }
.page-head h1 .material-symbols-outlined { color: var(--primary); font-size: var(--text-3xl); }
.page-head p { color: var(--text-secondary); margin-top: 8px; line-height: 1.6; }
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-3xl); padding: 24px; margin-bottom: 20px;
}
.card h2 { font-size: var(--text-lg); font-weight: 700; margin-bottom: 6px; }
.card .sub { color: var(--text-secondary); font-size: var(--text-base); line-height: 1.6; margin-bottom: 16px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-family: inherit; font-size: var(--text-md); font-weight: 700;
    border: none; border-radius: var(--radius-lg); padding: 12px 20px;
    background: var(--primary); color: #fff; transition: opacity .15s, transform .15s;
    text-decoration: none;
}
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn.small { font-size: var(--text-base); padding: 8px 12px; border-radius: var(--radius-md); }
.notice {
    border-radius: var(--radius-xl); padding: 14px 16px; font-size: var(--text-base); line-height: 1.6;
    display: flex; gap: 10px; align-items: flex-start;
}
.notice .material-symbols-outlined { font-size: var(--text-xl); flex-shrink: 0; margin-top: 1px; }
.notice.info { background: rgb(var(--brand-600-rgb) / 0.12); border: 1px solid var(--border); color: var(--text-secondary); }
.notice.warn { background: rgba(184,146,45,0.14); border: 1px solid rgba(184,146,45,0.35); color: var(--text-primary); }
.notice.err { background: rgba(196,84,84,0.14); border: 1px solid rgba(196,84,84,0.35); color: var(--text-primary); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
a.link { color: var(--primary); font-weight: 700; text-decoration: none; }
a.link:hover { text-decoration: underline; }
.feature-ul { list-style: none; margin-top: 8px; }
/* 2026-09-11: 종전에 `li` 가 display:flex 였다. 그러면 `<strong>` 이 **독립 flex item**
   이 되어 라벨과 본문이 두 칼럼으로 갈리고, 좁은 폭에서 라벨이 짓눌려 낱말 중간이
   꺾인다(라이브 390px 실캡처: `1. 라우팅` → `1. 라 / 우팅`).
   word-break:keep-all 로는 못 고친다 — 칼럼이 갈리는 것 자체가 원인이라 오히려
   `3. / 실시간 / 검증` 으로 더 쌓였다(고쳐 보고 캡처로 확인).
   그래서 flex 를 버리고 아이콘을 절대배치한다. 라벨과 본문이 한 줄로 흐른다.
   형제 CSS 셋을 같게 둔다 — bar 허브 CTA 결함이 형제 5곳 중 하나만 어긋나서 났다. */
.feature-ul li {
    display: block; position: relative; padding: 8px 0 8px 30px;
    font-size: var(--text-md); line-height: 1.55; color: var(--text-primary);
}
.feature-ul li .material-symbols-outlined {
    position: absolute; left: 0; top: 9px;
    color: var(--primary); font-size: var(--text-xl);
}
.kv { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.kv th, .kv td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.kv th { color: var(--text-secondary); font-weight: 600; white-space: nowrap; width: 34%; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: none; }
code, .mono {
    font-family: var(--font-mono);
    font-size: var(--text-base); word-break: break-all;
}
code { background: var(--code-bg); padding: 2px 6px; border-radius: var(--radius-sm); }
pre {
    background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 14px 16px; overflow-x: auto; margin-top: 10px;
}
pre code { background: none; padding: 0; font-size: var(--text-base); line-height: 1.55; white-space: pre; }
.steps { counter-reset: step; list-style: none; }
.steps li {
    counter-increment: step; position: relative; padding: 10px 0 10px 40px;
    font-size: var(--text-md); line-height: 1.6;
}
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 10px;
    width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff;
    font-size: var(--text-base); font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.keybox {
    margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-xl);
    background: var(--code-bg); border: 1px dashed var(--primary);
}
.keybox .val { font-family: var(--font-mono); font-size: var(--text-base); word-break: break-all; }
.keylist { list-style: none; margin-top: 12px; }
.keylist li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--text-base);
}
.keylist li:last-child { border-bottom: none; }
.hidden { display: none !important; }

/* ── 발급 흐름 다이어그램 ──────────────────────────────────────
   architecture.html 의 pipeline-stage/connector 스타일을 이 페이지의
   테마 토큰으로 옮겨 왔다. 원본은 다크 전용(rgba 하드코딩·color:white)이라
   그대로 쓰면 라이트 모드에서 글자가 사라진다. */
.flow { display: flex; flex-direction: column; gap: 0; }
.flow-stage {
    display: flex; align-items: stretch; gap: 16px;
    background: var(--code-bg); border: 1px solid var(--border);
    border-radius: var(--radius-2xl); padding: 18px;
    transition: border-color .2s, transform .2s;
}
.flow-stage:hover { border-color: var(--primary); transform: translateX(4px); }
.flow-connector {
    width: 3px; height: 22px; margin: 0 auto; border-radius: var(--radius-xs);
    background: linear-gradient(180deg, var(--primary), rgb(var(--brand-600-rgb) / 0.15));
}
.flow-badge {
    width: 52px; min-height: 52px; border-radius: var(--radius-2xl); flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    /* 흰 글자 대비를 위해 어두운 초록에서 시작한다 — var(--primary)(var(--brand-600))
       단독은 흰 텍스트 대비가 3.7:1 로 AA 미달이고, --purple(var(--brand-500)) 쪽으로
       갈수록 더 나빠진다. var(--brand-700) 시작이면 5.6:1 이 나온다. */
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--primary) 100%);
    color: #fff; font-weight: 900;
}
.flow-badge .n { font-size: var(--text-xs); opacity: .92; letter-spacing: .04em; }
.flow-badge .material-symbols-outlined { font-size: var(--text-xl); }
.flow-body { flex: 1; min-width: 0; }
.flow-body h3 { font-size: var(--text-md); font-weight: 800; margin-bottom: 4px; }
.flow-body p { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.55; }
.flow-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.flow-tag {
    padding: 3px 10px; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600;
    background: rgb(var(--brand-600-rgb) / 0.12); border: 1px solid var(--border); color: var(--text-secondary);
}
.flow-tag.code { font-family: var(--font-mono); font-size: var(--text-xs); }

/* ── 인증 범위 매트릭스 ─────────────────────────────────────── */
.scope { display: grid; gap: 10px; margin-top: 16px; }
.scope-row {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--code-bg); border: 1px solid var(--border);
    border-radius: var(--radius-2xl); padding: 14px 16px;
}
.scope-row.open { border-left: 4px solid var(--primary); }
.scope-row.gated { border-left: 4px solid var(--gold); }
.scope-label {
    font-size: var(--text-base); font-weight: 800; min-width: 92px;
    display: flex; align-items: center; gap: 5px;
}
.scope-label .material-symbols-outlined { font-size: var(--text-md); }
.scope-row.open .scope-label { color: var(--primary); }
.scope-row.gated .scope-label { color: var(--gold); }
.scope-items { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-items code { background: rgb(var(--brand-600-rgb) / 0.14); border: 1px solid var(--border); font-size: var(--text-sm); }
.scope-note { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
    .flow-stage { transition: none; }
    .flow-stage:hover { transform: none; }
}

@media (max-width: 640px) {
    .flow-stage { padding: 14px; gap: 12px; }
    .flow-badge { width: 44px; min-height: 44px; }
    .flow-badge .material-symbols-outlined { font-size: var(--text-lg); }
    .flow-body h3 { font-size: var(--text-md); }
    .scope-row { flex-direction: column; gap: 8px; }
    .wrap { padding: 28px 16px 60px; }
    .page-head h1 { font-size: var(--text-2xl); }
    .page-head h1 .material-symbols-outlined { font-size: var(--text-2xl); }
    .card { padding: 18px 16px; border-radius: var(--radius-2xl); }
    .card h2 { font-size: var(--text-md); }
    .feature-ul li { font-size: var(--text-base); }
    .kv th { width: 40%; }
    .actions { flex-direction: column; }
    .actions .btn { width: 100%; justify-content: center; }
}
