/* 리셋·기본 타이포. 값은 tokens.css의 변수만 읽는다. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

/* 고정 헤더가 앵커로 이동한 섹션 제목을 가리지 않게 */
[id] { scroll-margin-top: var(--header-h); }

body {
  font-family: var(--font-ko);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink-on-light);
}

h1, h2, h3, h4 { font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.16; letter-spacing: -.04em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -.035em; }
h3 { font-size: var(--fs-h3-sm); line-height: 1.3; letter-spacing: -.03em; }
p, li, dd { text-wrap: pretty; }
ul, ol { list-style: none; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: var(--radius); }
button { background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

:focus-visible { outline: 2px solid var(--accent, var(--blue)); outline-offset: 3px; }

/* 영문·숫자 도면 라벨 전용 (한글 라벨에는 자간을 넓히지 않는다) */
.mono { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: .08em; }

.wrap { max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
