:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #5b636d;
  --line: #e2e4e7;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --code-bg: #f1f3f5;
  --note-bg: #fff8e6;
  --note-line: #e7c766;
  --cta-bg: #eef4fd;
  --cta-line: #b9cff2;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #181b1f;
    --text: #e4e6e9;
    --muted: #9aa3ad;
    --line: #2c3137;
    --accent: #7fb0ff;
    --accent-text: #0d1117;
    --code-bg: #1e2228;
    --note-bg: #2a2516;
    --note-line: #6b5a23;
    --cta-bg: #172235;
    --cta-line: #2f4a75;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 4px 8px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-row { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 650; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; gap: 16px; font-size: 0.95rem; }

main { padding-top: 24px; padding-bottom: 48px; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0.4em 0 0.3em; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2em 0 0.5em; padding-top: 0.6em; border-top: 1px solid var(--line); }
h3 { font-size: 1.1rem; margin: 1.5em 0 0.4em; }

.meta, .crumbs { color: var(--muted); font-size: 0.9rem; }
.lede { font-size: 1.15rem; color: var(--muted); }

p, li { overflow-wrap: anywhere; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 6px; overflow-x: auto; line-height: 1.45; border: 1px solid var(--line); }
pre code { background: none; padding: 0; font-size: 0.85rem; }

.table-wrap { overflow-x: auto; margin: 1em 0; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { background: var(--code-bg); font-weight: 600; }
tr:last-child td { border-bottom: none; }

.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 18px 8px; margin: 1.2em 0; }
.summary-title { border: none; margin: 0.8em 0 0.2em; padding: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.summary ul { padding-left: 1.2em; }

.toc { border-left: 3px solid var(--line); padding: 2px 0 2px 14px; margin: 1.2em 0; font-size: 0.95rem; }
.toc-title { margin: 0 0 4px; font-weight: 600; }
.toc ol { margin: 0; padding-left: 1.2em; }

.note, .warn { border-left: 4px solid var(--note-line); background: var(--note-bg); padding: 10px 14px; border-radius: 4px; margin: 1em 0; }

.cta { background: var(--cta-bg); border: 1px solid var(--cta-line); border-radius: 8px; padding: 12px 18px; margin: 2em 0; }
.cta p { margin: 0.5em 0; }
.cta-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.cta-title { font-weight: 650; font-size: 1.1rem; }
.cta-button { display: inline-block; background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.cta-disclosure, .cta-note { font-size: 0.85rem; color: var(--muted); }
.cta-pending { border-style: dashed; }

.sources, .unverified, .related { font-size: 0.95rem; }
.src-note { color: var(--muted); }

.guide-list ul { list-style: none; padding: 0; }
.guide-list li { border-top: 1px solid var(--line); padding: 14px 0; }
.guide-list li p { margin: 4px 0; }
.guide-link { font-weight: 600; font-size: 1.08rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; padding: 20px 0 32px; }
.site-footer p { margin: 0.5em 0; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
}
