/* Protocol(Tailwind Plus) 스타일에 가깝게 보이도록, MkDocs 기본 HTML에 타이포/코드/표 스타일을 보강합니다.
   - Tailwind CDN에는 typography(prose) 플러그인이 없을 수 있어 `.prose`를 직접 정의합니다.
*/

/* 기본 */
html {
  scroll-behavior: smooth;
}

/* 폰트 스택 (사용자 요청: Pretendard 우선) */
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* Tailwind v4 유틸 일부를 CDN(v3) 환경에서도 보이게 하는 폴백 */
.backdrop-blur-xs {
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.tp-header-bg {
  background-color: rgb(255 255 255 / var(--bg-opacity-light, 0.9));
}
.dark .tp-header-bg {
  background-color: rgb(24 24 27 / var(--bg-opacity-dark, 0.8));
}
.bg-zinc-900\/7\.5 { background-color: rgb(24 24 27 / 0.075); }
.dark .dark\:bg-white\/7\.5 { background-color: rgb(255 255 255 / 0.075); }

.text-sm\/5 { font-size: 0.875rem; line-height: 1.25rem; }
.text-2xs { font-size: 0.625rem; line-height: 1rem; }

/* ===== Protocol 스타일 "본문(article/prose)" 레이아웃 ===== */
.tp-article {
  position: relative;
}

.tp-prose {
  position: relative;
}

/* Protocol 예시: [html_:where(&>*]:mx-auto/max-w-2xl … */
.tp-prose > * {
  max-width: 42rem; /* max-w-2xl */
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  .tp-prose > * {
    max-width: 48rem; /* max-w-3xl */
  }
}

/* hero background */
.tp-prose .tp-hero {
  position: absolute;
  inset: 0;
  z-index: -10;
  margin: 0;
  max-width: none;
  overflow: hidden;
  pointer-events: none;
}
.tp-prose .tp-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -120px;
  width: 1100px;
  height: 520px;
  transform: translateX(-50%) skewY(-18deg);
  opacity: 0.35;
  background:
    radial-gradient(closest-side at top, rgba(255,255,255,0.85), rgba(255,255,255,0)) ,
    linear-gradient(90deg, rgba(54,180,159,0.45), rgba(219,255,117,0.45));
  filter: blur(22px);
}
.dark .tp-prose .tp-hero::before {
  opacity: 0.9;
  background:
    radial-gradient(closest-side at top, rgba(255,255,255,0.08), rgba(255,255,255,0)),
    linear-gradient(90deg, rgba(54,180,159,0.18), rgba(219,255,117,0.18));
}
.tp-prose .tp-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -220px;
  width: 1400px;
  height: 700px;
  transform: translateX(-50%) skewY(-18deg);
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(0,0,0,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.18) 1px, transparent 1px);
  background-size: 72px 56px;
  mix-blend-mode: overlay;
}
.dark .tp-prose .tp-hero::after {
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
}

/* prose (tailwind-typography 대체 최소 구현) */
.prose {
  color: rgb(24 24 27); /* zinc-900 */
  line-height: 1.75;
}
.dark .prose {
  color: rgb(244 244 245); /* zinc-100 */
}

.prose a {
  color: rgb(79 70 229); /* indigo-600 */
  text-decoration: none;
}
.prose a:hover {
  text-decoration: underline;
}
.dark .prose a {
  color: rgb(129 140 248); /* indigo-400 */
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: rgb(24 24 27);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: 0.5rem !important;
  margin-bottom: 2rem !important;
}
.dark .prose h1,
.dark .prose h2,
.dark .prose h3,
.dark .prose h4 {
  color: rgb(250 250 250);
}
.prose h1 { font-size: 17px; margin-top: 0; }
.prose h2 { font-size: 17px; }
.prose h3 { font-size: 17px; }
.prose h4 { font-size: 17px; }

.prose p { margin: 0.6em 0; min-height: 28px; }
.prose ul, .prose ol { margin: 0.6em 0; padding-left: 1.25rem; }
.prose li { display: inline-flex; align-items: center; margin: 0.15em 0; }
.prose ul li label {
  display: inline-flex;
  align-items: center;
}

/* lead (Protocol 예시의 {{ className: 'lead' }}) */
.prose .lead {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: rgb(82 82 91); /* zinc-600 */
}
.dark .prose .lead {
  color: rgb(161 161 170); /* zinc-400 */
}

/* 코드/프리 */
.prose code {
  font-size: 1em;
  background: rgb(244 244 245); /* zinc-100 */
  padding: 0.1em 0.35em;
  border-radius: 0.375rem;
}
.dark .prose code {
  background: rgba(255, 255, 255, 0.08);
}

.prose pre {
  background: rgb(24 24 27); /* zinc-900 */
  color: rgb(244 244 245);
  padding: 0.5rem 1rem;
  overflow: auto;
  margin: 0 !important;
}
.dark .prose pre {
  background: rgb(9 9 11); /* zinc-950 */
}
.prose pre code {
  background: transparent;
  padding: 0;
}

/* 테이블 */
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 0 !important;
}
.prose th, .prose td {
  border-bottom: 1px solid rgb(228 228 231); /* zinc-200 */
  padding: 0.6rem 0.75rem;
  vertical-align: top;
}
.dark .prose th, .dark .prose td {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.prose th {
  text-align: left;
  color: rgb(39 39 42); /* zinc-800 */
  font-weight: 600;
}
.dark .prose th {
  color: rgb(228 228 231);
}

/* 구분선 */
.prose hr {
  border: 0;
  border-top: 1px solid rgb(228 228 231);
  margin: 2rem 0;
}
.dark .prose hr {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* 하이라이트 (==text==) */
.prose mark {
  background-color: rgba(253, 224, 71, 0.5); /* yellow-300 with opacity */
  color: inherit;
  padding: 0 0.1em;
  border-radius: 0.125rem;
}
.dark .prose mark {
  background-color: rgba(234, 179, 8, 0.4); /* yellow-500 with opacity */
  color: inherit;
}

/* 인용문 */
.prose blockquote {
  font-style: italic;
  border-left: 2px solid rgb(228 228 231);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: rgb(82 82 91);
}
.dark .prose blockquote {
  border-left-color: rgba(255, 255, 255, 0.2);
  color: rgb(161 161 170);
}
