:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #1d1c1a;
  --muted: #5f5c55;
  --line: #e4e1d9;
  --accent: #c2562f;
  --accent-soft: #f6e4dc;
  --term-bg: #1c1b19;
  --term-text: #ecebe6;
  --term-dim: #9a978e;
  --term-ok: #7fcf8a;
  --bar: #e07a52;
  --on-accent: #ffffff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #201f1c;
    --text: #ecebe6;
    --muted: #a6a299;
    --line: #34322d;
    --accent: #ee8a62;
    --accent-soft: #3a261d;
    --term-bg: #0f0e0d;
    --on-accent: #1a0f0a;
  }
}

* { 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", "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif;
}
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--accent); }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:not(pre) > code { background: var(--accent-soft); padding: .1em .35em; border-radius: 4px; font-size: .9em; }

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

header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--accent); }
nav.top a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav.top a:hover { color: var(--text); }

.hero { padding: 64px 0 32px; }
.hero h1 { font-size: clamp(30px, 5.4vw, 48px); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 16px; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); margin: 0 0 28px; max-width: 680px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 11px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; font-size: 16px; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }

.term {
  background: var(--term-bg); color: var(--term-text); border-radius: 10px;
  padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.55; margin: 36px 0 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.term .dim { color: var(--term-dim); }
.term .ok { color: var(--term-ok); }
.term .bar { color: var(--bar); }

section { padding: 40px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 16px; line-height: 1.25; }
section h3 { font-size: 19px; margin: 28px 0 8px; }

.timeline { display: grid; gap: 14px; margin: 20px 0; }
.tl-row { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.tl-row strong { display: block; margin-bottom: 8px; }
.track { position: relative; height: 30px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.seg { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; white-space: nowrap; }
.seg.win { background: var(--accent); opacity: .85; border-right: 2px solid var(--surface); }
.seg.win2 { background: var(--accent); opacity: .55; }
.ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.tl-row p { margin: 8px 0 0; font-size: 15px; color: var(--muted); }

ol.steps { padding-left: 22px; }
ol.steps li { margin: 8px 0; }

.copy { position: relative; margin: 10px 0 18px; }
.copy pre { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 13px 76px 13px 15px; margin: 0; overflow-x: auto; font-size: 14.5px; }
.copy button {
  position: absolute; top: 8px; right: 8px; font: 600 13px/1 inherit; font-family: inherit;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 6px; padding: 7px 10px; cursor: pointer;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

details { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 16px; margin: 10px 0; }
summary { font-weight: 600; cursor: pointer; }
details p { margin: 10px 0 2px; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 14px; }

.table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
table.cmp th, table.cmp td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.cmp tbody tr:last-child th, table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp thead th { font-size: 14px; color: var(--muted); }
table.cmp thead th:nth-child(2) { color: var(--accent); }
table.cmp tbody th { font-weight: 600; white-space: nowrap; }
table.cmp td:last-child { color: var(--muted); }

article.guide { max-width: 720px; padding: 48px 0 24px; }
article.guide h1 { font-size: clamp(28px, 4.6vw, 40px); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 14px; }
article.guide .meta { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
article.guide h2 { font-size: 24px; letter-spacing: -.015em; margin: 40px 0 12px; line-height: 1.3; }
article.guide li { margin: 6px 0; }
.callout { background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; margin: 20px 0; }
.callout p { margin: 0; }

@media (max-width: 560px) {
  nav.top a.hide-sm { display: none; }
  .hero { padding-top: 40px; }
  .term { font-size: 12px; padding: 14px; }
}
