:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1d1b;
  --muted: #6b6a65;
  --line: #e6e3dc;
  --accent: #2f6f5e;
  --accent-soft: #e7f1ed;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141513;
    --surface: #1c1d1b;
    --text: #ecebe6;
    --muted: #a3a29b;
    --line: #2e2f2c;
    --accent: #7cc4ad;
    --accent-soft: #1f2d28;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 2px; }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; }
.small { font-size: 0.82em; color: var(--muted); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 18px; height: 18px; border-radius: 5px; background: var(--accent); }
.lang a { font-size: 0.9rem; }

main { padding: 40px 16px 64px; }
h1 { font-size: 1.9rem; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 40px 0 12px; letter-spacing: -0.01em; }
.eyebrow { margin: 0 0 4px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.meta { color: var(--muted); margin: 0 0 24px; font-size: 0.92rem; }
.hero { padding: 24px 0 8px; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0; }

.summary { background: var(--accent-soft); border-radius: var(--radius); padding: 4px 20px; }
.summary ul { padding-left: 1.1em; }

.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 20px; margin: 0 0 8px; font-size: 0.92rem; }
.toc ol { margin: 0; padding-left: 0; list-style: none; columns: 2; column-gap: 24px; }
.toc li { break-inside: avoid; padding: 2px 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }
@media (max-width: 560px) { .toc ol { columns: 1; } }

section { scroll-margin-top: 16px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td ul { margin: 0; padding-left: 1.1em; }
.table-wrap + .table-wrap { margin-top: 12px; }
table.kv caption { text-align: left; font-weight: 600; padding: 10px 12px 0; }
table.kv th { width: 9.5em; white-space: normal; }
#summary h2 { margin-top: 0; }
.summary + .toc, section#summary + .toc { margin-top: 24px; }

/* Narrow screens: each data-table row becomes a card. */
@media (max-width: 560px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { display: block; border: 0; padding: 4px 14px; }
  table.stack td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
  }
  table.kv th { width: 6.5em; }
}

.app-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.app-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.app-list li:last-child { border-bottom: 0; }
.app-name { font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 20px; padding-bottom: 32px; }

@media print {
  .site-header, .site-footer, .toc { display: none; }
  body { background: #fff; color: #000; }
}
