/* design-system.md §6.1 포커스 링 표준의 시행 게이트 — tap-highlight reset / :focus(non-visible) outline 차단.
   비대상: input/textarea/select(폼 요소는 §3.2 컴포넌트 focus 스타일 유지).

   sticky hover 차단 정책:
   모바일 브라우저는 탭 시 :hover 가 발화되어 다음 탭까지 잔존(스크롤만 의도해도 배경색 잔존).
   따라서 컴포넌트 CSS의 모든 :hover 룰은 `@media (hover: hover)` 가드 안에 작성한다.
   — hover 가능 장치(데스크톱 마우스/트랙패드)만 hover 시각 효과를 받음.
   — 터치 디바이스는 :hover 가 적용되지 않고, 명확한 탭에는 :active/포커스 링이 응답.
   신규 :hover 룰 추가 시 가드 누락 금지(§8.5 머지 게이트 보조 룰). */

/* 글로벌 타이포그래피 단일 출처.
   `html body`(0,0,0,2)로 unlayered Bootstrap `body { font: Helvetica }`(0,0,0,1) 우위 확보.
   콜로셋이 .ko / .en / 헤딩 / .btn 자식 셀렉터로 font-family를 직접 매치해 body 상속을 끊는 패턴이라
   동일 selector list에 `font-family: inherit`로 cascade 복구 필요. */
html body {
  font-family: var(--rl-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.ko, .ko small,
.en,
h1, h2, h3, h4, h5, h6,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.btn, .pagination, .sr-score {
  font-family: inherit;
}

/* 안드로이드 웹뷰/크롬 노랑·주황·검정 기본 highlight 차단.
   html 셀렉터 포함 — anchor 외 빈 영역 더블탭 잔존 highlight 보호용. */
html,
a,
button,
[role="button"],
summary,
label,
[tabindex]:not([tabindex="-1"]) {
  -webkit-tap-highlight-color: transparent;
}

/* Bootstrap `a:hover, a:focus { text-decoration: underline }` 무력화.
   Bootstrap은 theme의 add_stylesheet 큐로 emit되어 base-interaction.css보다 뒤에 위치하고
   둘 다 unlayered(Bootstrap은 legacy layer 미포함 — apms.css/mobile.css·default.css·colorset.css만 layered).
   동일 specificity(0,1,1)면 source order로 Bootstrap이 이김 → PC 클릭(:hover+:active) 시 underline 노출.
   해법: `html` prefix로 specificity를 (0,1,2)로 한 단계 bump해 source-order 무관 우위 확보.
   :active 도 포함 — 모바일 탭 시 underline 노출 회피(대칭성). */
html a:hover,
html a:focus,
html a:active {
  text-decoration: none;
}

/* 터치 후 잔존 :focus의 기본 outline 차단.
   @supports 거짓 분기(미지원 환경)는 :focus 기본 표시 유지 — 키보드 접근성 보존. */
@supports selector(:focus-visible) {
  a:focus:not(:focus-visible),
  button:focus:not(:focus-visible),
  [role="button"]:focus:not(:focus-visible),
  summary:focus:not(:focus-visible),
  label:focus:not(:focus-visible),
  [tabindex]:not([tabindex="-1"]):focus:not(:focus-visible) {
    outline: none;
  }
}
