/* shared primitives — themes override --* on :root */
:root {
  --font-sans: "IBM Plex Sans KR", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-serif: "Noto Serif KR", "Source Han Serif KR", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Pretendard", monospace;
  --max: 72rem;
  --narrow: 42rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; }
.wrap { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { width: min(var(--narrow), calc(100% - 2.5rem)); margin-inline: auto; }
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .9rem 0; flex-wrap: wrap;
}
.brand { font-weight: 700; text-decoration: none; color: var(--fg); letter-spacing: -.02em; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
nav.site { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .92rem; }
nav.site a { color: var(--fg); text-decoration: none; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--accent); }
.hero { padding: 3.4rem 0 2.6rem; }
.hero h1 { font-family: var(--head); font-weight: 700; letter-spacing: -.03em; line-height: 1.25; margin: 0 0 .8rem; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 40rem; }
.badge {
  display: inline-block; font-size: .75rem; letter-spacing: .06em; text-transform: none;
  border: 1px solid var(--line); padding: .2rem .55rem; border-radius: 999px; color: var(--muted); margin-bottom: .8rem;
}
.notice, .legal-box, .warn {
  border: 1px solid var(--line); padding: 1rem 1.1rem; border-radius: 8px; background: var(--card); margin: 1.2rem 0;
}
.warn { border-color: var(--warn-line, #c4a35a); background: var(--warn-bg, #fbf6ea); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 1.15rem 1.2rem; background: var(--card); }
.card h2, .card h3 { margin-top: 0; font-size: 1.05rem; }
.cta-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
  padding: .7rem 1.15rem; border-radius: 8px; font-weight: 600; border: 0; cursor: pointer; font-size: 1rem;
}
.btn:hover { filter: brightness(1.08); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--accent); }
section { padding: 1.6rem 0; }
h2 { font-family: var(--head); letter-spacing: -.02em; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
footer.site { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.6rem 0 2.4rem; color: var(--muted); font-size: .86rem; }
footer.site a { color: inherit; }
form.stack label { display: block; font-weight: 600; margin: .9rem 0 .3rem; font-size: .92rem; }
form.stack input, form.stack select, form.stack textarea {
  width: 100%; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--fg); font: inherit;
}
form.stack textarea { min-height: 7rem; resize: vertical; }
form.stack .hint { color: var(--muted); font-size: .82rem; font-weight: 400; }
.ok { color: #157a3a; }
.err { color: #a32020; }
.steps { counter-reset: st; list-style: none; padding: 0; }
.steps li { counter-increment: st; position: relative; padding: .4rem 0 .4rem 2.4rem; }
.steps li::before {
  content: counter(st); position: absolute; left: 0; top: .45rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: .8rem;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.muted { color: var(--muted); }
.small { font-size: .88rem; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.kpi { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 600; }
.mock-tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: #8a4b00; background: #ffe8b8; padding: .1rem .4rem; border-radius: 4px; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 2.2rem 0 1.6rem; }
}
