@charset "utf-8";
/* ============================================================
   헬스체크 — 디자인 시스템
   컨셉: 금융 커머스(굿리치몰) 스타일 — 밝은 배경, 큰 라운드 카드,
        신뢰감 있는 블루, 넉넉한 여백, 모바일 퍼스트
   ============================================================ */

/* ── 토큰 ────────────────────────────────────────────────── */
:root {
  --brand: #1b64da;
  --brand-600: #1557c0;
  --brand-700: #0f4bb3;
  --brand-soft: #eaf1fe;
  --brand-soft-2: #f5f8ff;
  --accent: #00b69b;
  --accent-soft: #e6f8f5;
  --warn: #e8833a;
  --warn-soft: #fff4ea;
  --danger: #d93f5c;
  --danger-soft: #fdedf0;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --line: #e6e9f0;
  --line-2: #eef1f6;

  --tx: #17202e;
  --tx-2: #46536b;
  --tx-3: #77839a;
  --tx-inv: #ffffff;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  --sh-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --sh-2: 0 2px 4px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.07);
  --sh-3: 0 12px 40px rgba(16, 24, 40, 0.12);

  --wrap: 1180px;
  --header-h: 64px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #5b93f5;
    --brand-600: #7aa9f8;
    --brand-700: #a3c4fb;
    --brand-soft: #16233b;
    --brand-soft-2: #131c2e;
    --accent: #2fd0b6;
    --accent-soft: #102b28;
    --warn-soft: #2c2016;
    --danger-soft: #2e1820;

    --bg: #0b1220;
    --surface: #121a2a;
    --surface-2: #161f31;
    --line: #24304a;
    --line-2: #1d2740;

    --tx: #e9eef7;
    --tx-2: #b3c0d6;
    --tx-3: #8695b0;

    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --sh-2: 0 4px 20px rgba(0, 0, 0, 0.45);
    --sh-3: 0 12px 40px rgba(0, 0, 0, 0.55);
  }
}

/* ── 리셋 ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: -0.015em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; letter-spacing: -0.03em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.cat-guide { padding-top: 0; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.15em; }

/* ── 헤더 ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark svg { width: 34px; height: 34px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 18px; font-weight: 800; letter-spacing: -0.04em; }
.brand-text small { font-size: 11px; color: var(--tx-3); font-weight: 500; }

.main-nav { display: none; margin-left: 8px; flex: 1; min-width: 0; }
.main-nav ul { display: flex; gap: 2px; list-style: none; }
.nav-link {
  display: block; padding: 8px 12px; border-radius: var(--r-full);
  font-size: 14.5px; font-weight: 600; color: var(--tx-2); white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--brand-soft); color: var(--brand); }
.nav-link.is-active { background: var(--brand); color: #fff; }

.header-actions { display: flex; gap: 6px; margin-left: auto; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--surface); color: var(--tx-2);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn .ico { width: 20px; height: 20px; }

/* ── 홈 화면 추가 ────────────────────────────────────────── */
.install-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 12px;
  border: 1px solid var(--brand); border-radius: var(--r-full);
  background: var(--brand-soft); color: var(--brand); font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.install-btn[hidden] { display: none; }
.install-btn:hover { background: var(--brand); color: #fff; }
.install-btn .ico { width: 19px; height: 19px; }
@media (max-width: 400px) {
  .install-btn { width: 44px; padding: 0; justify-content: center; }
  .install-tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.install-sheet {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center;
  padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 18, 32, 0.5);
}
.install-sheet[hidden] { display: none; }
.install-card {
  position: relative; width: 100%; max-width: 420px; padding: 22px 20px 18px;
  border-radius: var(--r-md); background: var(--surface); color: var(--tx); box-shadow: var(--sh-2);
}
.install-title { margin: 0 36px 12px 0; font-size: 17px; font-weight: 800; }
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 15px; line-height: 1.6; color: var(--tx-2); }
.install-steps b { color: var(--tx); }
.install-share { width: 18px; height: 18px; margin: 0 2px 0 4px; vertical-align: -3px; color: var(--brand); }
.install-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--tx-3); cursor: pointer;
}
.install-close .ico { width: 20px; height: 20px; }

.mobile-nav { border-top: 1px solid var(--line); background: var(--surface); padding: 16px 0 20px; }
.m-search { display: flex; gap: 8px; margin-bottom: 14px; }
.m-search input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); color: var(--tx);
}
.m-search button {
  width: 46px; height: 46px; border: 0; border-radius: var(--r-md);
  background: var(--brand); color: #fff; display: grid; place-items: center;
}
.m-nav-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-nav-list a {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 600; background: var(--surface-2);
}
.m-ico {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c);
}
.m-ico .ico { width: 17px; height: 17px; }

@media (min-width: 1024px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ── 버튼 ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r-md);
  font-size: 15.5px; font-weight: 700; transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(27, 100, 218, 0.25); }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: var(--surface); color: var(--tx-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }

/* ── 히어로 ──────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(900px 380px at 88% -10%, rgba(0, 182, 155, 0.16), transparent 60%),
    linear-gradient(160deg, #1b64da 0%, #2d7bf6 45%, #1449a0 100%);
  color: #fff; padding: 44px 0 52px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 200px;
  background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 32px; }
.hero-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 6px 14px; border-radius: var(--r-full); margin-bottom: 16px;
}
.hero-title { font-size: clamp(28px, 6.4vw, 46px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.28; }
.hero-desc { margin-top: 14px; font-size: 15.5px; color: rgba(255, 255, 255, 0.86); max-width: 34em; }
.hero-search {
  display: flex; align-items: center; gap: 8px; margin-top: 26px; padding: 8px;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3); max-width: 560px;
}
.hero-search .hs-ico { width: 20px; height: 20px; margin-left: 12px; color: var(--tx-3); flex: none; }
.hero-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; height: 48px;
  font-size: 15.5px; color: var(--tx); font-family: inherit;
}
.hero-search input:focus { outline: none; }
.hero-search .btn { height: 48px; padding: 0 20px; }
.chip-link {
  font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff;
  transition: background 0.15s;
}
.chip-link:hover { background: rgba(255, 255, 255, 0.28); }

.hero-visual { display: none; position: relative; min-height: 260px; }
.hv-card {
  position: absolute; background: var(--surface); color: var(--tx);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.hv-card b { font-size: 16px; font-weight: 700; }
.hv-card small { font-size: 12.5px; color: var(--tx-3); }
.hv-1 { top: 8px; left: 4%; width: 210px; }
.hv-2 { top: 108px; right: 2%; width: 190px; }
.hv-3 { bottom: 4px; left: 24%; width: 175px; }
.hv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-bottom: 6px; }
.hv-badge {
  align-self: flex-start; font-size: 11px; font-weight: 800; color: #fff; background: var(--accent);
  padding: 3px 9px; border-radius: var(--r-full); margin-bottom: 6px;
}
@media (min-width: 900px) {
  .hero { padding: 64px 0 76px; }
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; align-items: center; }
  .hero-visual { display: block; }
}

/* ── 섹션 ────────────────────────────────────────────────── */
.section { padding: 44px 0; }
.section-tint { background: var(--surface-2); border-block: 1px solid var(--line-2); }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: clamp(21px, 4.2vw, 28px); font-weight: 800; }
.section-head p { margin-top: 8px; color: var(--tx-3); font-size: 15px; }
.page-h1 { font-size: clamp(24px, 5vw, 34px); font-weight: 800; margin-bottom: 12px; }

/* ── 카테고리 그리드 ─────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(8, 1fr); } }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.cat-ico {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c);
}
.cat-ico .ico { width: 24px; height: 24px; }
.cat-name { font-size: 14.5px; font-weight: 700; }
.cat-count { font-size: 12px; color: var(--tx-3); }
.cat-card.is-soon { opacity: 0.82; }
.cat-card.is-soon .cat-count { color: var(--warn); }

/* ── 카드 그리드 ─────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 680px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 9px; height: 100%; }
.chip {
  align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 10px;
  border-radius: var(--r-full); color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, transparent);
}
.chip-lg { font-size: 13px; padding: 6px 14px; }
.card-title { font-size: 17px; font-weight: 700; line-height: 1.45; }
.card-desc { font-size: 14px; color: var(--tx-3); line-height: 1.62; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12.5px; color: var(--tx-3); margin-top: 4px; }
.meta-item { display: inline-flex; align-items: center; gap: 4px; }
.badge-pillar {
  font-size: 11.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #1b64da, #00b69b);
  padding: 3px 10px; border-radius: var(--r-full);
}

/* ── 대표 글 카드 ────────────────────────────────────────── */
.feature-card {
  display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.fc-body { padding: 26px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.fc-body h3 { font-size: clamp(19px, 3.6vw, 25px); font-weight: 800; line-height: 1.4; }
.fc-body p { color: var(--tx-2); font-size: 15px; }
.fc-cta { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: 15px; margin-top: 4px; }
.fc-side { background: var(--brand-soft); padding: 24px 26px; }
.fc-side ul { list-style: none; display: grid; gap: 10px; }
.fc-side li {
  position: relative; padding-left: 26px; font-size: 14.5px; font-weight: 600; color: var(--tx-2);
}
.fc-side li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}
@media (min-width: 860px) { .feature-card { grid-template-columns: 1.35fr 1fr; } .fc-body { padding: 34px; } }

/* ── 시즌 스포트라이트 (홈 · 독감 예방접종 등) ─────────────── */
.spotlight { padding-bottom: 8px; }
.spot-card {
  display: grid; background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-1);
}
.spot-card + .spot-card { margin-top: 16px; }
.spot-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.spot-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface));
  padding: 5px 12px; border-radius: var(--r-full);
}
.spot-eyebrow .ico { width: 16px; height: 16px; }
.spot-body h3 { font-size: clamp(20px, 3.8vw, 26px); font-weight: 800; line-height: 1.35; }
.spot-body h3 a:hover { color: var(--c); }
.spot-body > p { color: var(--tx-2); font-size: 15px; }
.spot-ctas { list-style: none; display: grid; gap: 8px; width: 100%; margin-top: 4px; }
.spot-ctas a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 700; color: var(--tx); background: var(--surface-2);
  transition: border-color 0.15s, color 0.15s;
}
.spot-ctas a:hover { border-color: var(--c); color: var(--c); }
.spot-ctas .ico { width: 18px; height: 18px; flex: none; color: var(--c); }
.spot-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.spot-more-h { font-size: 13px; font-weight: 700; color: var(--tx-3); margin-right: 2px; }
.spot-chip {
  font-size: 13.5px; font-weight: 600; color: var(--tx-2); padding: 6px 12px;
  border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface);
  transition: border-color 0.15s, color 0.15s;
}
.spot-chip:hover { border-color: var(--c); color: var(--c); }
.spot-facts {
  margin: 0; padding: 22px 24px; display: grid; gap: 10px; align-content: center;
  background: color-mix(in srgb, var(--c) 9%, var(--surface));
}
.spot-facts div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 10px; border-bottom: 1px dashed color-mix(in srgb, var(--c) 30%, var(--line));
}
.spot-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.spot-facts dt { font-size: 14px; font-weight: 600; color: var(--tx-2); }
.spot-facts dd { margin: 0; font-size: 16px; font-weight: 800; color: var(--c); white-space: nowrap; }
@media (min-width: 860px) {
  .spot-card { grid-template-columns: 1.35fr 1fr; }
  .spot-body { padding: 32px; }
  .spot-facts { padding: 28px 32px; }
}

/* ── 신뢰 섹션 ───────────────────────────────────────────── */
.trust-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
}
.trust-item b { display: block; margin: 12px 0 6px; font-size: 16.5px; }
.trust-item p { font-size: 14px; color: var(--tx-3); line-height: 1.65; }
.ti-ico {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  background: var(--brand-soft); color: var(--brand);
}
.ti-ico .ico { width: 23px; height: 23px; }

/* ── 브레드크럼 ──────────────────────────────────────────── */
.breadcrumb { padding: 16px 0 4px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--tx-3); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--tx-3); }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb li:last-child span {
  max-width: 22em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom;
}

/* ── 글 레이아웃 ─────────────────────────────────────────── */
.article-layout { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 56px; align-items: start; }
@media (min-width: 1080px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; } }

.article {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 26px 20px 34px; box-shadow: var(--sh-1); min-width: 0;
}
@media (min-width: 760px) { .article { padding: 38px 44px 46px; } }
.article-head { padding-bottom: 20px; border-bottom: 1px solid var(--line-2); margin-bottom: 22px; }
.article-title { font-size: clamp(24px, 5vw, 35px); font-weight: 800; line-height: 1.34; margin: 14px 0 12px; }
.article-lead { font-size: 16px; color: var(--tx-2); line-height: 1.72; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: 13px; color: var(--tx-3); }
.am-item { display: inline-flex; align-items: center; gap: 5px; }
.am-src { color: var(--brand); font-weight: 600; }

/* ── 바이라인 (제목 아래 글쓴이 표기) ─────────────────────── */
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin-top: 16px; font-size: 14px; color: var(--tx-3);
}
.by-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; margin-right: 2px;
  background: linear-gradient(135deg, #2D7BF6, #0F4BB3);
  color: #fff; font-size: 14px; font-weight: 800;
}
.by-role { font-size: 13px; color: var(--tx-3); }
.by-name { font-weight: 700; color: var(--tx); }
a.by-name:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.by-org { font-size: 13px; color: var(--tx-3); }
.by-sep { color: var(--tx-3); opacity: .7; }

/* ── 작성자 박스 (본문 하단) ─────────────────────────────── */
.author-box {
  margin-top: 24px; padding: 22px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1px solid var(--line);
}
.ab-h { font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.ab-body { display: flex; gap: 14px; align-items: flex-start; }
.ab-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2D7BF6, #0F4BB3);
  color: #fff; font-size: 20px; font-weight: 800;
}
.ab-tx { min-width: 0; }
.ab-name { font-size: 16.5px; font-weight: 800; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.ab-role { font-size: 12.5px; font-weight: 600; color: var(--brand); }
.ab-bio { margin-top: 8px; font-size: 14px; color: var(--tx-2); line-height: 1.72; }
.ab-meta { margin-top: 10px; font-size: 12.8px; color: var(--tx-3); }
.ab-links { margin-top: 6px; font-size: 13px; }
.ab-links a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.ab-more { margin-top: 10px; font-size: 13px; }
.ab-more a { color: var(--tx-2); font-weight: 600; }
.ab-more a:hover { color: var(--brand); }
.ab-sep { margin: 0 7px; color: var(--tx-3); opacity: .7; }

/* 30초 요약 */
.key-summary {
  background: linear-gradient(180deg, var(--brand-soft), var(--brand-soft-2));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: var(--r-lg); padding: 20px 22px; margin: 22px 0;
}
.ks-h { font-size: 14px; font-weight: 800; color: var(--brand); margin-bottom: 10px; }
.key-summary ul { list-style: none; display: grid; gap: 8px; }
.key-summary li { position: relative; padding-left: 22px; font-size: 15px; font-weight: 600; color: var(--tx); }
.key-summary li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand);
}

/* 목차 */
.toc {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 4px 20px; margin: 22px 0 28px;
}
.toc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-weight: 700; }
.toc > summary::-webkit-details-marker { display: none; }
.toc-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15.5px; }
.toc-toggle { font-size: 12.5px; color: var(--tx-3); font-weight: 500; }
.toc-list { list-style: none; padding: 4px 0 16px; counter-reset: toc; }
.toc-list li { margin: 2px 0; }
.toc-list .toc-l2 { counter-increment: toc; }
.toc-list .toc-l2 > a::before { content: counter(toc) ". "; color: var(--brand); font-weight: 700; }
.toc-list .toc-l3 { padding-left: 18px; }
.toc-list .toc-l3 > a::before { content: "– "; color: var(--tx-3); }
.toc-list a { font-size: 14.5px; color: var(--tx-2); }
.toc-list a:hover { color: var(--brand); text-decoration: underline; }

/* ── 본문 타이포 ─────────────────────────────────────────── */
.prose { font-size: 16.5px; line-height: 1.85; color: var(--tx); }
.prose > p { margin: 0 0 18px; }
.prose .hd-2 {
  font-size: clamp(20px, 4vw, 25px); font-weight: 800; margin: 42px 0 16px;
  padding-top: 6px; position: relative; scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose .hd-2::before {
  content: ""; display: block; width: 34px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent)); margin-bottom: 14px;
}
.prose .hd-3 {
  font-size: clamp(17px, 3.4vw, 19.5px); font-weight: 700; margin: 30px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose .hd-4 { font-size: 16.5px; font-weight: 700; margin: 22px 0 10px; color: var(--tx-2); }
/* 앵커의 '#' 는 CSS 로만 표시한다 — 제목 텍스트(SEO·스크린리더)를 오염시키지 않기 위해 */
.anchor { margin-left: 8px; color: var(--line); font-weight: 400; opacity: 0; transition: opacity 0.15s; }
.anchor::before { content: "#"; }
.hd:hover .anchor, .anchor:focus-visible { opacity: 1; color: var(--brand); }
@media (hover: none) { .anchor { display: none; } }

.prose strong { font-weight: 700; color: var(--tx); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--brand) 16%, transparent) 0); padding: 0 1px; }
.prose em { font-style: normal; color: var(--brand); font-weight: 600; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em;
  background: var(--brand-soft); color: var(--brand-700); padding: 2px 6px; border-radius: 6px;
}
.prose a.in-link {
  color: var(--brand); font-weight: 600; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent);
  text-underline-offset: 3px; text-decoration-thickness: 2px;
}
.prose a.in-link:hover { text-decoration-color: var(--brand); background: var(--brand-soft); }
.prose a.ext-link {
  color: var(--brand); font-weight: 600; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 30%, transparent); text-underline-offset: 3px;
}
.ext-ico {
  display: inline-block; width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14L21 3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14L21 3'/%3E%3C/svg%3E") center/contain no-repeat;
}

.prose .md-ul, .prose .md-ol { margin: 0 0 20px; padding-left: 0; list-style: none; }
.prose .md-ul > li { position: relative; padding-left: 22px; margin: 9px 0; }
.prose .md-ul > li::before {
  content: ""; position: absolute; left: 4px; top: 0.72em; width: 7px; height: 7px;
  border-radius: 50%; background: color-mix(in srgb, var(--brand) 60%, transparent);
}
.prose .md-ol { counter-reset: ol; }
.prose .md-ol > li { position: relative; padding-left: 34px; margin: 11px 0; counter-increment: ol; }
.prose .md-ol > li::before {
  content: counter(ol); position: absolute; left: 0; top: 0.28em;
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}

.prose blockquote {
  margin: 22px 0; padding: 16px 20px; border-left: 4px solid var(--brand);
  background: var(--brand-soft-2); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--tx-2); font-size: 15.5px;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

/* 표 */
.table-wrap {
  margin: 22px 0; overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { font-size: 14.5px; min-width: 460px; }
.table-wrap th, .table-wrap td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table-wrap thead th {
  background: var(--brand-soft); color: var(--brand-700); font-weight: 700; white-space: nowrap;
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.table-wrap tbody th { font-weight: 700; color: var(--tx); background: var(--surface-2); white-space: nowrap; }
.table-wrap tbody tr:last-child th, .table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover td, .table-wrap tbody tr:hover th { background: color-mix(in srgb, var(--brand) 4%, transparent); }

/* 이미지 */
.fig { margin: 26px 0; }
.fig img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.fig figcaption { margin-top: 10px; font-size: 13px; color: var(--tx-3); text-align: center; }

/* 콜아웃 */
.callout {
  margin: 24px 0; padding: 18px 20px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface-2);
}
.callout-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.callout-ico { font-size: 16px; line-height: 1; }
.callout-body { font-size: 15.5px; color: var(--tx-2); }
.callout-body > p { margin: 0 0 10px; }
.callout-body > p:last-child, .callout-body > ul:last-child, .callout-body > ol:last-child { margin-bottom: 0; }
.callout-body .md-ul > li, .callout-body .md-ol > li { margin: 6px 0; }
.callout-tip { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 24%, transparent); }
.callout-tip .callout-title { color: var(--brand-700); }
.callout-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.callout-warn .callout-title { color: #b45f1c; }
.callout-check { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.callout-check .callout-title { color: #067a68; }
.callout-doctor { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 26%, transparent); }
.callout-doctor .callout-title { color: var(--danger); }
.callout-link { background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); border-color: color-mix(in srgb, var(--brand) 20%, transparent); }
.callout-source { background: var(--surface-2); }

/* 본문 계산기 (src/lib/calc.js + main.js) */
.calc {
  margin: 28px 0; padding: 20px; border-radius: var(--r-lg);
  border: 2px solid color-mix(in srgb, var(--brand) 30%, var(--line)); background: var(--surface);
  box-shadow: var(--sh-1);
}
.calc-head { margin-bottom: 14px; }
.calc-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 800; font-size: 17px; color: var(--brand-700); }
.calc-ico { font-size: 18px; line-height: 1; }
.calc-desc { margin: 0; font-size: 14.5px; color: var(--tx-2); }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.calc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.calc-field label { font-size: 13.5px; font-weight: 700; color: var(--tx); }
.calc-field input, .calc-field select {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--tx);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.calc-field input:focus, .calc-field select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.calc-unit { display: flex; align-items: center; gap: 8px; }
.calc-unit input { flex: 1; min-width: 0; text-align: right; }
.calc-unit span { flex: none; font-size: 14px; color: var(--tx-2); }
.calc-hint { margin: 0; font-size: 12.5px; color: var(--tx-3); }
.calc-out { margin-top: 16px; }
.calc-out:empty { display: none; }
.calc-msg { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--tx); font-size: 14.5px; }
.calc-msg.is-warn { background: var(--warn-soft); }
.calc-out .table-wrap table.calc-table { min-width: 0; }
.calc-table td strong { display: block; font-size: 16px; color: var(--tx); }
.calc-sub { display: block; margin: 2px 0 0; font-size: 13px; color: var(--tx-3); }
.calc-table tr.is-key th, .calc-table tr.is-key td { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.calc-table tr.is-key td strong { color: var(--brand-700); }
.calc-table tr.is-plus td strong { color: #067a68; }
.calc-table tr.is-minus td strong { color: var(--danger); }
.calc-verdict { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.calc-verdict-title { margin: 0 0 6px; font-weight: 800; color: var(--tx); }
.calc-verdict ul { margin: 0; padding-left: 18px; }
.calc-verdict li { margin: 6px 0; font-size: 14.5px; }
.calc-badge { display: inline-block; padding: 2px 10px; border-radius: var(--r-full); font-size: 13px; font-weight: 700; color: #fff; }
.calc-badge.is-full { background: #067a68; }
.calc-badge.is-half { background: #b45f1c; }
.calc-badge.is-zero { background: var(--danger); }
.calc-note { margin: 14px 0 0; font-size: 12.5px; color: var(--tx-3); }
@media (max-width: 560px) {
  .calc { padding: 16px; }
  .calc-grid { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  .calc-table tr.is-plus td strong { color: var(--accent); }
  .calc-badge.is-full { background: #0b8f7a; }
}

@media (prefers-color-scheme: dark) {
  .callout-warn .callout-title { color: #e8a468; }
  .callout-check .callout-title { color: #4fd8bf; }
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-section { margin-top: 46px; }
.faq-list { display: grid; gap: 10px; margin-top: 18px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; }
.faq-item > summary {
  list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: flex-start;
  padding: 16px 18px; font-weight: 700; font-size: 15.5px; line-height: 1.6;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-q, .faq-a-mark {
  flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; margin-top: 1px;
}
.faq-q { background: var(--brand); color: #fff; }
.faq-a-mark { background: var(--accent-soft); color: var(--accent); }
.faq-a { display: flex; gap: 10px; padding: 0 18px 18px; }
.faq-a p { font-size: 15.5px; color: var(--tx-2); line-height: 1.8; }
.faq-item[open] > summary { border-bottom: 1px solid var(--line-2); padding-bottom: 14px; margin-bottom: 14px; }

/* ── 필러 내비 ───────────────────────────────────────────── */
.pillar-nav { margin-top: 46px; padding: 26px 22px; border-radius: var(--r-xl); background: var(--surface-2); border: 1px solid var(--line); }
.pillar-h { font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.pillar-grid { display: grid; gap: 8px; }
@media (min-width: 700px) { .pillar-grid { grid-template-columns: 1fr 1fr; } }
.pillar-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color 0.15s, transform 0.15s;
}
.pillar-item:hover { border-color: var(--brand); transform: translateX(2px); }
.pillar-num { font-size: 13px; font-weight: 800; color: var(--brand); flex: none; margin-top: 2px; }
.pillar-tx { display: flex; flex-direction: column; min-width: 0; }
.pillar-tx b { font-size: 14.8px; font-weight: 700; line-height: 1.5; }
.pillar-tx small { font-size: 12.5px; color: var(--tx-3); margin-top: 2px; }

/* ── 출처 박스 ───────────────────────────────────────────── */
.source-box {
  margin-top: 40px; padding: 22px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1px dashed var(--line);
}
.src-h { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.src-list { list-style: none; display: grid; gap: 6px; margin-bottom: 12px; }
.src-list a { font-size: 14.5px; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.src-note { font-size: 13.5px; color: var(--tx-3); line-height: 1.7; }
.src-note a { color: var(--brand); font-weight: 600; }
.src-updated { margin-top: 12px; font-size: 13px; color: var(--tx-3); }

/* ── 관련 글 ─────────────────────────────────────────────── */
.related { margin-top: 40px; }
.rel-heading { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.rel-list { list-style: none; display: grid; gap: 8px; }
.rel-list a {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color 0.15s, background 0.15s;
}
.rel-list a:hover { border-color: var(--brand); background: var(--brand-soft); }
.rel-chip {
  flex: none; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full);
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
}
.rel-title { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.55; }
.rel-arrow { color: var(--tx-3); width: 18px; height: 18px; flex: none; }

/* ── 사이드바 ────────────────────────────────────────────── */
.sidebar { display: none; }
@media (min-width: 1080px) { .sidebar { display: block; } }
.side-sticky { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.side-card, .side-toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px;
}
.side-h { font-size: 13.5px; font-weight: 800; color: var(--tx-3); margin-bottom: 12px; letter-spacing: 0; }
.side-toc-list { list-style: none; counter-reset: stoc; display: grid; gap: 4px; max-height: 46vh; overflow-y: auto; }
.side-toc-list li { counter-increment: stoc; }
.side-toc-list a {
  display: block; font-size: 13.8px; color: var(--tx-2); padding: 6px 10px; border-radius: 8px;
  border-left: 2px solid transparent; line-height: 1.5;
}
.side-toc-list a::before { content: counter(stoc) ". "; color: var(--tx-3); }
.side-toc-list a:hover { background: var(--brand-soft); color: var(--brand); }
.side-toc-list a.is-current { background: var(--brand-soft); color: var(--brand); font-weight: 700; border-left-color: var(--brand); }
.side-cta { display: grid; gap: 8px; }
.side-cta .btn { height: 44px; font-size: 14.5px; }

/* ── 광고 ────────────────────────────────────────────────── */
.ad-wrap {
  margin: 30px 0; text-align: center;
  /* 광고가 들어올 자리를 미리 확보해 레이아웃 이동(CLS)을 줄인다 */
  contain: layout;
}
.ad-label {
  display: block; font-size: 11px; color: var(--tx-3);
  letter-spacing: 0.06em; margin-bottom: 6px;
}
.ad-slot { display: block; width: 100%; min-height: 100px; }
/* 인아티클 광고: 실제 렌더링 높이에 맞춰 공간을 예약 */
.ad-inArticle .ad-slot { min-height: 250px; }
.ad-sidebar .ad-slot { min-height: 250px; }

/* 광고가 채워지지 않은(unfilled) 슬롯은 통째로 감춰 빈 박스가 남지 않게 한다 */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-wrap:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

.ad-placeholder {
  display: grid; place-items: center; min-height: 110px; border: 1px dashed var(--line);
  border-radius: var(--r-md); background: var(--surface-2); color: var(--tx-3); font-size: 12.5px;
}
.ad-inArticle .ad-placeholder, .ad-sidebar .ad-placeholder { min-height: 250px; }
.ad-articleTop { margin-top: 22px; }

/* 본문 안 광고는 문단과 확실히 구분되도록 여백을 넉넉히 */
.prose + .ad-wrap, .ad-inArticle { margin: 34px 0; }

/* ── 카테고리 히어로 ─────────────────────────────────────── */
.cat-hero {
  padding: 34px 0 30px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), transparent);
  border-bottom: 1px solid var(--line);
}
.cat-hero-ico {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); margin-bottom: 14px;
}
.cat-hero-ico .ico { width: 27px; height: 27px; }
.cat-hero h1 { font-size: clamp(23px, 4.6vw, 32px); font-weight: 800; }
.cat-hero p { margin-top: 10px; color: var(--tx-2); font-size: 15.5px; max-width: 46em; }
.cat-hero-count {
  display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent); padding: 5px 13px; border-radius: var(--r-full);
}

/* 준비 중 상태 */
.empty-state {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 30px 24px; text-align: center;
}
.es-title { font-size: 18px; font-weight: 800; }
.es-desc { margin: 8px 0 20px; color: var(--tx-3); font-size: 14.5px; }
.es-topics { list-style: none; display: grid; gap: 8px; max-width: 460px; margin: 0 auto 24px; text-align: left; }
.es-topics li {
  display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; color: var(--tx-2);
  padding: 11px 14px; background: var(--surface-2); border-radius: var(--r-md); border: 1px solid var(--line-2);
}
.es-topics .ico { color: var(--accent); margin-top: 4px; }

/* ── 검색 페이지 ─────────────────────────────────────────── */
.search-page { padding: 32px 0 64px; }
.search-form {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.search-form input { flex: 1; min-width: 0; border: 0; background: transparent; height: 50px; font-size: 16px; color: var(--tx); font-family: inherit; }
.search-form input:focus { outline: none; }
.search-hint { margin: 14px 0 20px; font-size: 14px; color: var(--tx-3); }
.search-results { display: grid; gap: 10px; }
.sr-item {
  display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); transition: border-color 0.15s;
}
.sr-item:hover { border-color: var(--brand); }
.sr-cat { font-size: 12px; font-weight: 700; color: var(--brand); }
.sr-title { font-size: 17px; font-weight: 700; margin: 5px 0 6px; line-height: 1.5; }
.sr-desc { font-size: 14px; color: var(--tx-3); line-height: 1.65; }
.sr-item mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ── 검색 자동완성 · 추천 키워드 ─────────────────────────
   패널을 절대배치하지 않고 흐름 안에 두는 이유:
   .hero 가 overflow:hidden (곡선 장식 때문) 이라 절대배치하면 잘린다.
   흐름 배치는 잘릴 일이 없고 모바일에서 스크롤도 자연스럽다.
   ──────────────────────────────────────────────────────── */
.hs-box { position: relative; max-width: 560px; margin-top: 26px; }
.hs-box .hero-search { margin-top: 0; }
.hs-panel {
  margin-top: 10px; padding: 8px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-2); max-height: min(62vh, 460px); overflow-y: auto;
}
.hs-panel-h { font-size: 12.5px; font-weight: 700; color: var(--tx-3); padding: 7px 10px 7px; }
.hs-list { list-style: none; display: grid; gap: 2px; }
.hs-item { display: block; padding: 10px 12px; border-radius: var(--r-md); color: var(--tx); }
.hs-item:hover, .hs-item.is-active { background: var(--brand-soft); }
.hs-cat { display: block; font-size: 11.5px; font-weight: 700; color: var(--brand); }
.hs-t { display: block; font-size: 15px; font-weight: 700; line-height: 1.45; margin-top: 3px; }
.hs-d {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; color: var(--tx-3); line-height: 1.55; margin-top: 4px;
}
.hs-more {
  display: block; text-align: center; margin-top: 6px; padding: 12px;
  border-top: 1px solid var(--line-2); font-size: 13.5px; font-weight: 700; color: var(--brand);
}
.hs-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.hs-empty { padding: 14px 12px; font-size: 14px; color: var(--tx-3); line-height: 1.65; }
.hs-panel mark {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: inherit; border-radius: 3px; padding: 0 2px;
}

/* 추천 / 연관 키워드 칩 */
.kw-suggest { margin-top: 18px; }
.kw-suggest-h { font-size: 12.5px; font-weight: 700; color: var(--tx-3); margin-bottom: 9px; }
.hero .kw-suggest-h { color: rgba(255, 255, 255, 0.8); }
.kw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kw-chip {
  display: inline-flex; align-items: center; min-height: 40px;
  font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line); color: var(--tx-2);
  transition: border-color 0.15s, color 0.15s;
}
.kw-chip:hover { border-color: var(--brand); color: var(--brand); }
/* 칩 안의 일치 부분은 배경색 대신 밑줄로 표시한다(파란 히어로 위에서도 읽힌다) */
.chip-link mark, .kw-chip mark {
  background: transparent; color: inherit; font-weight: 800;
  text-decoration: underline; text-underline-offset: 2px;
}
.search-page .kw-suggest { margin: 18px 0 2px; }

/* ── 404 ─────────────────────────────────────────────────── */
.nf { padding: 60px 0 80px; text-align: center; }
.nf-code { font-size: 68px; font-weight: 800; color: var(--brand); line-height: 1; }
.nf-desc { color: var(--tx-3); margin: 10px 0 24px; }
.nf-grid { margin-top: 44px; text-align: left; }

/* ── 정적 페이지 ─────────────────────────────────────────── */
.page-static .article { margin-top: 8px; }
.article-static .prose { font-size: 16px; }

/* ── 푸터 ────────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 32px; margin-top: 20px; }
.footer-grid { display: grid; gap: 30px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.f-logo { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.f-desc { font-size: 14px; color: var(--tx-3); line-height: 1.7; max-width: 34em; }
.f-src { margin-top: 12px; font-size: 13px; color: var(--tx-3); }
.f-src a { color: var(--brand); text-decoration: underline; }
.footer-col h2 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { font-size: 14px; color: var(--tx-3); }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line-2); }

/* 발행 주체 (운영자·사업자 정보) */
.f-biz { margin-bottom: 18px; }
.f-biz-h { font-size: 13px; font-weight: 800; color: var(--tx-2); margin-bottom: 10px; }
.f-biz-list { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.f-biz-row { display: flex; gap: 7px; font-size: 12.5px; line-height: 1.7; }
.f-biz-row dt { color: var(--tx-3); flex: none; }
.f-biz-row dd { margin: 0; color: var(--tx-2); font-weight: 600; }
.f-biz-row dd a { color: var(--tx-2); text-decoration: underline; text-underline-offset: 3px; }
.f-biz-row dd a:hover { color: var(--brand); }
.f-biz-note { margin-top: 10px; font-size: 12.5px; color: var(--tx-3); line-height: 1.75; }
.f-biz-note a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.disclaimer { font-size: 12.5px; color: var(--tx-3); line-height: 1.75; }
.copy { margin-top: 12px; font-size: 12.5px; color: var(--tx-3); }

/* ── 맨 위로 ─────────────────────────────────────────────── */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--tx-2);
  box-shadow: var(--sh-2); font-size: 18px; display: grid; place-items: center;
}
.to-top:hover { color: var(--brand); border-color: var(--brand); }

/* ── 읽기 진행바 ─────────────────────────────────────────── */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent)); z-index: 120; transition: width 0.1s linear;
}

/* ── 인쇄 ────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .sidebar, .ad-wrap, .to-top, .install-sheet, .related, .breadcrumb, .read-progress { display: none !important; }
  body { background: #fff; }
  .article { border: 0; box-shadow: none; padding: 0; }
}

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

/* ============================================================
   모바일 최적화 보완
   ============================================================ */

/* 가로 스크롤 방지 안전장치.
   html 에만 지정한다 — body 에도 주면 body 가 클리핑 컨테이너가 되어
   sticky 헤더가 깨질 수 있다. clip 을 쓰는 이유도 hidden 이 sticky 를 깨기 때문. */
html { overflow-x: clip; }

/* ── 터치 타깃 최소 44px 확보 ─────────────────────────────── */
.icon-btn { width: 44px; height: 44px; }
.chip-link { display: inline-flex; align-items: center; min-height: 40px; }
.toc-list li { margin: 0; }
.toc-list a { display: block; padding: 9px 8px; border-radius: 8px; }
.toc-list a:hover { background: var(--brand-soft); }
.footer-col ul { gap: 2px; }
.footer-col a { display: inline-block; padding: 8px 0; }
.breadcrumb a { display: inline-block; padding: 5px 0; }
.src-list li { margin: 2px 0; }
.src-list a { display: inline-block; padding: 5px 0; }
.f-src a, .prose a { text-underline-offset: 3px; }

/* ── 표 가로 스크롤 안내 ─────────────────────────────────── */
.table-wrap { scrollbar-width: thin; scrollbar-color: var(--line) transparent; scroll-behavior: smooth; }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.scroll-hint {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  font-size: 12px; color: var(--tx-3); margin: 20px 2px -14px; transition: opacity 0.2s;
}
.scroll-hint.is-done { opacity: 0; }

/* ── iOS 안전영역 ────────────────────────────────────────── */
.to-top {
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  right: calc(18px + env(safe-area-inset-right, 0px));
}
.site-footer { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }

/* ── 섹션 앵커 이동 시 헤더에 가리지 않도록 ───────────────── */
.faq-section, .source-box, .author-box, .related, .pillar-nav { scroll-margin-top: calc(var(--header-h) + 20px); }

/* ── 작은 화면(≤480px) ───────────────────────────────────── */
@media (max-width: 480px) {
  .table-wrap table { min-width: 420px; font-size: 14px; }
  .table-wrap th, .table-wrap td { padding: 10px 12px; }
  .prose { font-size: 16px; }
  .article-meta { gap: 6px 12px; font-size: 12.5px; }
  .byline { font-size: 13px; gap: 6px; }
  .author-box { padding: 18px 17px; }
  .ab-body { gap: 12px; }
  .ab-avatar { width: 42px; height: 42px; font-size: 18px; }
  .f-biz-list { gap: 4px 14px; }
  .key-summary { padding: 18px; }
  .callout { padding: 16px 17px; }
  .toc { padding: 2px 16px; }
  .source-box, .pillar-nav { padding: 20px 17px; }
}

/* ── 아주 작은 화면(≤400px) ──────────────────────────────── */
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .article { padding: 22px 16px 30px; }
  .brand-text small { display: none; }
  .brand-text b { font-size: 17px; }
  .m-nav-list { grid-template-columns: 1fr; }
  .hero-search { padding: 6px; }
  .hero-search .hs-ico { margin-left: 8px; }
  .hero-search .btn { padding: 0 15px; font-size: 14.5px; }
  .hero-search input { font-size: 15px; }
  .cat-grid { gap: 10px; }
  .cat-card { padding: 15px 8px; }
  .hero { padding: 34px 0 44px; }
}

/* ── 가로 모드 낮은 높이 ─────────────────────────────────── */
@media (max-height: 480px) and (orientation: landscape) {
  .side-toc-list { max-height: 30vh; }
}
