/*
Theme Name: Autopilot
Description: Lean, fast, SEO/GEO/AEO-optimized reading theme for wp-autopilot. Zero external fonts (system stack → no CLS), one small stylesheet, minimal JS, semantic HTML5, light/dark. Styles the ap-* content components (lead, TOC, stats, quotes, FAQ, tags).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: autopilot
*/

/* ============================ design tokens ============================ */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Pretendard", "Malgun Gothic", Roboto, "Noto Sans KR", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --bg: #ffffff;
  --surface: #f6f8fb;
  --surface-2: #eef2f7;
  --fg: #16202c;
  --fg-soft: #45525f;
  --muted: #64707d;   /* surface(#f6f8fb) 위 4.5:1+ — 구 #6b7784는 4.29 AA 미달 실측 */
  --border: #e2e8f0;
  --accent: #2f54eb;
  --accent-ink: #1d39c4;
  --accent-soft: #eaefff;
  --accent-contrast: #ffffff;
  --ok: #1a7f52;
  --shadow: 0 1px 2px rgba(16, 32, 44, .04), 0 4px 16px rgba(16, 32, 44, .06);

  --measure: 44rem;      /* readable line length */
  --wrap: 72rem;         /* page max width */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;   /* 대형 카드(CTA)·본문 이미지 공용 */
  --space: clamp(1rem, 2.5vw, 1.5rem);
  --lh: 1.75;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #161b22;
    --surface-2: #1c232d;
    --fg: #e7edf3;
    --fg-soft: #b7c2ce;
    --muted: #8b98a6;
    --border: #263140;
    --accent: #6f8cff;
    --accent-ink: #9db2ff;
    --accent-soft: #182238;
    --accent-contrast: #0e1116;
    --ok: #4ec98a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
/* explicit override wins over media query when the user toggles */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --surface: #f6f8fb; --surface-2: #eef2f7; --fg: #16202c;
  --fg-soft: #45525f; --muted: #64707d; --border: #e2e8f0; --accent: #2f54eb;
  --accent-ink: #1d39c4; --accent-soft: #eaefff; --accent-contrast: #ffffff; --ok: #1a7f52;
  --shadow: 0 1px 2px rgba(16, 32, 44, .04), 0 4px 16px rgba(16, 32, 44, .06);
} /* 토큰 미재선언 시 시스템다크의 media 다크토큰이 계속 이겨 '라이트 전환' 버튼이 침묵(2026-07-11 적대검증 critical) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1116; --surface: #161b22; --surface-2: #1c232d; --fg: #e7edf3;
  --fg-soft: #b7c2ce; --muted: #8b98a6; --border: #263140; --accent: #6f8cff;
  --accent-ink: #9db2ff; --accent-soft: #182238; --accent-contrast: #0e1116; --ok: #4ec98a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

/* ============================ base ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: var(--lh);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  word-break: keep-all;   /* Korean-friendly line breaking */
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-contrast); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
main { display: block; }

/* ============================ header ============================ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 93%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { display: flex; align-items: center; gap: 1rem; height: 3.75rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 38px; width: auto; display: block; flex-shrink: 0; object-fit: contain; }
@media (max-width: 640px) {
  .brand-logo { height: 26px; }
  .site-header .bar { flex-wrap: wrap; height: auto; row-gap: .35rem; padding-block: .5rem; }
  .site-header .bar > .theme-toggle { margin-left: auto; }   /* 로고와 같은 줄, 우측 정렬 */
  .site-nav { order: 3; flex-basis: 100%; margin: 0; overflow-x: visible; } /* 내비를 자체 줄로 — 3링크 전부 노출(2026-07-13 FAQ 추가로 단일줄 예산 초과 해소) */
  .site-nav ul { justify-content: center; gap: 1.3rem; }
}
.site-nav { margin-left: auto; min-width: 0; }
.site-nav ul { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--fg-soft); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--accent-ink); }
.theme-toggle { background: var(--surface); border: 1px solid var(--border); color: var(--fg-soft); width: 2.2rem; height: 2.2rem; border-radius: 999px; cursor: pointer; display: inline-grid; place-items: center; font-size: 1rem; flex-shrink: 0; }
.theme-toggle:hover { color: var(--accent-ink); border-color: var(--accent); }

/* ============================ breadcrumbs ============================ */
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 1rem 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs li::after { content: "›"; margin-left: .4rem; color: var(--muted); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-ink); }

/* ============================ article ============================ */
.article { padding: 1.25rem 0 3.5rem; }
.article-head { max-width: var(--measure); margin-inline: auto; padding: 1rem 0 1.5rem; }
.cat-badge { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); background: var(--accent-soft); padding: .28rem .6rem; border-radius: 999px; }
.article-title { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.2; letter-spacing: -.02em; margin: .8rem 0 .6rem; color: var(--fg); }
.article-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--muted); font-size: .9rem; }
.article-meta .sep { display: none; } /* 줄바꿈 시 줄 끝 고아 · 방지 — gap이 시각 분리 담당 (2026-07-11) */
.article-meta .sep { color: var(--muted); }

.featured { max-width: var(--wrap); margin: 0 auto 2rem; }
.featured img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16 / 7; object-fit: cover; background: var(--surface); }

/* HTML 히어로 카드 — 래스터 대체. 제목=브라우저 네이티브 폰트라 무한 선명. 브랜드 일관 위해 항상 다크. */
.post-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: #0e1116; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--hero-accent, #4361ee) 26%, transparent); /* 다크모드에서 배경과의 경계 */
  padding: clamp(1.75rem, 4.5vw, 3.25rem);
  margin: 1.25rem 0 1.25rem;
  min-height: clamp(13rem, 30vw, 18rem);
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.28);
}
.post-hero::before {                      /* accent spine */
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: 6px; background: var(--hero-accent, #4361ee);
}
.post-hero::after {                       /* soft corner glow */
  content: ""; position: absolute; top: -34%; right: -6%;
  width: min(46%, 23rem); aspect-ratio: 1; border-radius: 50%;
  background: color-mix(in srgb, var(--hero-accent, #4361ee) 32%, #0e1116);
  z-index: -1;
}
.hero-cat {
  align-self: flex-start; color: color-mix(in srgb, var(--hero-accent, #4361ee) 55%, #fff); /* 다크 카드 위 대비 */
  font-weight: 800; font-size: .9rem; letter-spacing: .01em;
  text-decoration: none; margin-bottom: 1rem;
}
.hero-cat:hover { text-decoration: underline; }
.hero-title {
  color: #f2f5f8; font-weight: 800;
  font-size: clamp(1.75rem, 4.6vw, 2.9rem);
  line-height: 1.24; letter-spacing: -.015em;
  margin: 0; max-width: 24ch;
  word-break: keep-all;      /* 한글 어절 단위 줄바꿈 (구두점·조사가 줄 시작 되는 것 방지) */
  text-wrap: balance;        /* 줄 길이 균형 */
}
.hero-brand {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.75rem; color: #96a2b0; font-weight: 600; font-size: 1.05rem;
}
.hero-dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--hero-accent, #4361ee); }
.post-hero + .article-meta { margin-top: 1rem; }

/* the content column */
.entry { max-width: var(--measure); margin-inline: auto; }
.entry > * { margin-block: 0 1.35rem; }
.entry h2 { font-size: 1.5rem; line-height: 1.3; letter-spacing: -.01em; margin-top: 2.6rem; padding-top: .4rem; scroll-margin-top: 5rem; }
.entry h3 { font-size: 1.2rem; margin-top: 1.8rem; }
.entry h2 + p, .entry h3 + p { margin-top: 0; }
.entry p, .entry li { color: var(--fg-soft); }
.entry strong { color: var(--fg); }
.entry ul, .entry ol { padding-left: 1.3rem; }
.entry li { margin-bottom: .4rem; }
.entry a { font-weight: 500; }

/* tables — horizontally scrollable on small screens (no page x-scroll) */
.entry table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.entry thead th { text-align: left; background: var(--surface-2); color: var(--fg); font-weight: 700; }
.entry th, .entry td { border: 1px solid var(--border); padding: .55rem .7rem; white-space: nowrap; }
.entry tbody tr:nth-child(even) { background: var(--surface); }

.entry pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto; font-family: var(--font-mono); font-size: .85rem; line-height: 1.5; }
.entry :not(pre) > code { background: var(--surface-2); padding: .12em .4em; border-radius: 5px; font-family: var(--font-mono); font-size: .88em; }
.entry img { border-radius: var(--radius-lg); max-width: 100%; } /* toss.tech 본문 이미지 radius 16px 흡수 */
.entry del { color: var(--muted); }

/* ---- ap-lead: answer-first callout ---- */
.ap-lead {
  font-size: 1.18rem; line-height: 1.7; color: var(--fg); font-weight: 500;
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  padding: 1.1rem 1.25rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 2rem;
}

/* ---- 질문 h2 순번 — 만화책 쪽번호식 진행감 (entry 직계 h2 = 질문 8개만, 소급 CSS) ---- */
.entry { counter-reset: apq; }
.entry > h2 { counter-increment: apq; }
.entry > h2::before { content: counter(apq, decimal-leading-zero); display: block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; color: var(--accent-ink); margin-bottom: .3rem; font-variant-numeric: tabular-nums; }

/* ---- ap-toc: table of contents ---- */
.ap-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2.2rem; }
.ap-toc::before { content: "목차"; display: block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .55rem; }
.ap-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.ap-toc ul { counter-reset: apt; }
.ap-toc li { margin: 0; counter-increment: apt; } /* .entry li 마진 누수 차단 */
.ap-toc li a::before { content: counter(apt, decimal-leading-zero); margin-right: .55em; color: var(--accent-ink); font-weight: 700; font-size: .78rem; font-variant-numeric: tabular-nums; }
.ap-toc a { display: block; color: var(--fg-soft); text-decoration: none; font-size: .95rem; padding: .15rem 0; border-left: 2px solid transparent; padding-left: .7rem; }
.ap-toc a:hover, .ap-toc a.is-active { color: var(--accent-ink); border-left-color: var(--accent); }

/* ---- ap-stats: key statistics ---- */
/* 토스식 스탯 타일 — 문장 나열 대신 큰 숫자(stat-n 첫 토큰)가 시각 앵커 (2026-07-11).
   구 ▲ 마커 제거: 92.6%(비중)처럼 '증가'가 아닌 지표에 의미 오류였음 */
.ap-stats { margin: 2.4rem 0; }
.ap-stats h2, .ap-stats h3 { margin: 0 0 .8rem; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ap-stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; }
.ap-stats li { margin: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; font-size: .88rem; line-height: 1.55; color: var(--fg-soft); box-shadow: var(--shadow); }
.ap-stats li strong.stat-n { font-weight: 700; color: var(--fg); } /* stat-r 내부 보조 수치 */
.ap-stats li > strong.stat-n { order: 0; display: block; font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--accent-ink); margin: 0 0 .3rem; font-variant-numeric: tabular-nums; } /* 직계=대표 숫자만 승격 — 숫자-우선 배열로 행 y좌표 통일(라벨 줄수 차이 지그재그 해소) */
.ap-stats li .stat-l { order: 1; }
.ap-stats li .stat-r { order: 2; margin-top: .15rem; }
.ap-stats li cite { order: 3; display: block; margin-top: auto; padding-top: .55rem; font-size: .76rem; font-style: normal; color: var(--muted); }
.ap-stats ul:has(li:nth-child(4)) { grid-template-columns: repeat(2, 1fr); } /* 4타일 글은 3+1 고아 대신 2×2 */
@media (max-width: 640px) { .ap-stats ul:has(li:nth-child(4)) { grid-template-columns: 1fr; } }

/* ---- ap-quotes / blockquote ---- */
.ap-quotes { margin: 2.4rem 0; }
.ap-quotes h2, .ap-quotes h3 { font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }
.entry blockquote, .ap-quote {
  border-left: 3px solid var(--accent); background: var(--surface); margin: 0 0 1.1rem;
  padding: .9rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ap-quote p { margin: 0 0 .4rem; color: var(--fg); font-size: 1.05rem; }
.ap-quote cite, .entry blockquote cite { font-style: normal; font-size: .85rem; color: var(--muted); }
.ap-quote cite a { color: var(--muted); }

/* ---- ap-faq accordion ---- */
.ap-faq h2 { font-size: 1.5rem; } /* 본문 섹션 h2와 동급 */
.ap-faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .6rem; background: var(--surface); overflow: hidden; }
.ap-faq summary { cursor: pointer; padding: .95rem 1.1rem; font-weight: 700; color: var(--fg); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ap-faq summary::-webkit-details-marker { display: none; }
.ap-faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.ap-faq details[open] summary::after { transform: rotate(45deg); }
.ap-faq .ap-faq-a { padding: 0 1.1rem 1.05rem; color: var(--fg-soft); }

/* ---- meta: updated + tags ---- */
.ap-updated { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 1.2rem; }
.ap-tags { font-size: .8rem; line-height: 2; color: var(--muted); margin-top: 1.4rem !important; word-break: keep-all; overflow-wrap: anywhere; } /* 해시 토큰 단위 줄바꿈 + 시각 소음 감소 */

/* ---- CTA: 전문 대응 문의 (arklink / drphishing funnel) ---- */
.ap-cta { position: relative; overflow: hidden; margin: 2.4rem 0; padding: 2rem 2.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.ap-cta::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); }
.ap-cta h2 { margin: 0 0 .7rem; font-size: 1.3rem; color: var(--fg); }
.ap-cta > p { margin: 0 0 .9rem; color: var(--fg-soft); }
.ap-cta-list { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .65rem; }
.ap-cta-list li { position: relative; padding-left: 1.5rem; color: var(--fg-soft); margin: 0; }
.ap-cta-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; } /* 단일 액센트 체계 — 의미 대비는 dodont만 녹/적 */
.ap-cta-list strong { color: var(--fg); }
.ap-cta-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0 0 .7rem !important; }
.ap-btn { display: inline-block; background: var(--accent); color: var(--accent-contrast); font-weight: 700; padding: .72rem 1.25rem; border-radius: 999px; text-decoration: none; line-height: 1.2; }
.ap-btn:hover { background: var(--accent-ink); }
.ap-btn-ghost { background: transparent; color: var(--accent-ink); border: 1px solid var(--accent); }
.ap-btn-ghost:hover { background: var(--accent-soft); }

/* 골든타임 상단 CTA (몸캠피싱 카테고리 전용, 리드 위) — 카드 + 상단 그라디언트 라인 */
.golden-cta { max-width: var(--measure); position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.1rem 2.3rem; margin: 1.75rem auto 2rem; box-shadow: var(--shadow); } /* 본문 축(measure) 정렬 */
.golden-cta::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); }
.gc-label { display: inline-flex; align-items: center; gap: .5rem; color: var(--accent-ink); font-weight: 700; font-size: .76rem; letter-spacing: .06em; margin-bottom: .8rem; }
.gc-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); flex: none; }
.gc-headline { color: var(--fg); font-weight: 800; font-size: clamp(1.2rem, 3vw, 1.4rem); line-height: 1.4; letter-spacing: -.012em; margin: 0 0 .55rem; }
.gc-sub { color: var(--fg-soft); font-size: 1.02rem; line-height: 1.62; margin: 0 0 1.5rem; max-width: 52ch; }
.gc-actions { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.gc-pri { display: inline-flex; align-items: center; gap: .45rem; background: var(--accent); color: var(--accent-contrast); font-weight: 700; padding: .85rem 1.5rem; border-radius: 12px; text-decoration: none; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.gc-pri:hover { background: var(--accent-ink); }
.gc-gho { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent-ink); font-weight: 700; padding: .85rem .5rem; text-decoration: none; }
.gc-gho:hover { text-decoration: underline; }

/* 신고 채널별 역할 대조표 (공공기관 vs 전문대응 — 아크링크 차별점 부각) */
.role-compare { max-width: var(--wrap); margin: 2.4rem auto 0; }
.role-compare h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0 0 1rem; color: var(--fg); }
.role-table-scroll { overflow-x: auto; }
.role-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 34rem; }
.role-table th, .role-table td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.role-table thead th { background: var(--surface); font-weight: 700; color: var(--fg); white-space: nowrap; }
.role-table tbody td { color: var(--fg-soft); }
.role-table tr.role-us td { background: var(--accent-soft); color: var(--fg); font-weight: 500; }
.role-note { margin: 1.1rem 0 0; color: var(--fg-soft); line-height: 1.7; }
.role-note strong { color: var(--fg); }
.table-hint { display: none; }
@media (max-width: 640px) {
  .table-hint { display: block; font-size: .78rem; font-weight: 600; color: var(--accent-ink); margin: 0 0 .5rem; animation: swipe-hint-arrow 1.6s ease-in-out infinite; }
}
.ap-btn-ghost { background: transparent; color: var(--accent-ink); border: 1px solid var(--accent); }
.ap-btn-ghost:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ap-cta-note { font-size: .9rem; margin: .2rem 0 0 !important; } /* color는 .ap-cta>p(fg-soft) 상속 — muted 선언은 명시도에 지던 죽은 코드였음 */
/* 모바일 가독성: 라벨 줄바꿈 + 행간 확대 + 버튼 세로 풀너비 */
@media (max-width: 640px) {
  .ap-cta { padding: 1.5rem 1.3rem; }
  .ap-cta h2 { font-size: 1.16rem; line-height: 1.4; }
  .ap-cta > p { font-size: .95rem; line-height: 1.78; }
  .ap-cta-list { gap: 1.05rem; margin-bottom: 1.3rem; }
  .ap-cta-list li { padding-left: 1.6rem; line-height: 1.62; }
  .ap-cta-list li strong { display: block; margin-bottom: .18rem; }
  .ap-cta-actions { flex-direction: column; align-items: stretch; gap: .6rem; }
  .ap-cta-actions .ap-btn { text-align: center; padding-top: .85rem; padding-bottom: .85rem; }
  .ap-cta-note { line-height: 1.65; }
}

/* prev/next + related */
.post-nav { max-width: var(--wrap); margin: 3rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-nav a:only-child { grid-column: 1 / -1; } /* 이전 글만 있을 때 전폭 종결감 */
.post-nav a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--fg); }
.post-nav a:hover { border-color: var(--accent); }
.post-nav .lbl { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .3rem; }
.post-nav .next { text-align: right; }

/* related posts */
.related { max-width: var(--wrap); margin: 4rem auto 0; } /* 대구획 전환 */
.related > h2 { font-size: 1.35rem; margin: 0 0 1.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; list-style: none; margin: 0; padding: 0; } /* auto-fit: 카드 3개가 빈 트랙 없이 전체 폭을 나눔 */
.related-grid > li { display: contents; } /* li가 그리드/flex 레이아웃에 투명하게 참여 */
.related-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; text-decoration: none; color: var(--fg); display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-card .rthumb { aspect-ratio: 16 / 8; object-fit: cover; width: 100%; background: var(--surface-2); }
.related-card .rbody { padding: .85rem 1rem 1.05rem; display: flex; flex-direction: column; gap: .4rem; }
.related-card .rcat { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.related-card .rtitle { font-weight: 700; font-size: .96rem; line-height: 1.4; }
.swipe-hint { display: none; }
/* 모바일: 세로 나열 대신 가로 스크롤 캐러셀 (카드 78% → 다음 카드 살짝 노출로 스크롤 유도 + 스냅 + 힌트) */
@media (max-width: 640px) {
  .related > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
  .swipe-hint {
    display: inline-flex; font-size: .76rem; font-weight: 600; color: var(--accent-ink);
    white-space: nowrap; animation: swipe-hint-arrow 1.6s ease-in-out infinite;
  }
  .related-grid {
    display: flex; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; gap: .9rem;
    padding-bottom: .4rem; scrollbar-width: none;
  }
  .related-grid::-webkit-scrollbar { display: none; }
  .related-card { flex: 0 0 78%; scroll-snap-align: start; }
  .related-card:hover { transform: none; }
}
@keyframes swipe-hint-arrow {
  0%, 100% { transform: translateX(0); opacity: .65; }
  50%      { transform: translateX(5px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .swipe-hint, .table-hint { animation: none; } }

/* credentials page (ISO / patents / awards) */
.cred-nav, .pill-nav { display: flex; flex-wrap: wrap; gap: .6rem; max-width: var(--wrap); margin: 1.4rem auto 0; } /* 인트로 텍스트 아래·섹션 직전 — 가리키는 대상과 근접 그루핑 */
.cred-nav a, .pill-nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .92rem; font-weight: 600; color: var(--fg); text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.cred-nav a:hover, .pill-nav a:hover { border-color: var(--accent-ink); color: var(--accent-ink); background: var(--accent-soft); }
@media (max-width: 640px) { .cred-nav a, .pill-nav a { padding: .42rem .8rem; font-size: .88rem; } } /* 390px 한 줄 유지 */
.cred-section { max-width: var(--wrap); margin: 2.6rem auto 0; }
.cred-section:last-of-type { margin-bottom: 3.2rem; } /* 마지막 카드가 푸터에 0px 맞닿는 것 방지(적대검증 critical) */
.cred-section > h2 { font-size: 1.4rem; margin: 0 0 1.2rem; display: flex; align-items: center; gap: .6rem; }
.cred-count { font-size: .78rem; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: .12rem .55rem; }
/* justified 갤러리: 행이 컨테이너 폭을 꽉 채우고, 행 내 모든 이미지는 동일 높이 + 고유 비율(--ar=w/h).
   flex-grow·flex-basis 둘 다 --ar 비례 → 남는 공간도 비례 분배 = 행 내 이미지 높이 수학적으로 동일. */
/* 균일높이 갤러리 — justified(grow∝비율)는 행 구성이 다르면 행 높이가 달라져
   "1행 vs 2행 가로세로 불일치"(2026-07-11 사용자 지적) → 이미지 높이를 상수 H로 고정,
   카드 폭 = 비율(--ar) × H. 모든 행의 상·하단 라인이 수학적으로 일치, 원본 비율 무손상. */
/* 균일 격자 — 자산 17장 중 16장이 0.753(실측)이라 이미지 박스를 공통 3/4로 고정하고 유일한
   가로형(기술평가 상패 1.388)만 2트랙 스팬+contain. 고정 트랙(1fr 반복)이라 모든 행의 열 라인과
   좌우 가장자리가 일치 — 직전 가변폭+가운데정렬의 계단 가장자리(2026-07-11 지적) 재발 방지. */
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); grid-auto-flow: dense; gap: 1.4rem; } /* 3열: 인증서 대형화 + 특허 6장=3+3 완결(5열의 5+1 고아행 해소) */
.cred-card { position: relative; margin: 0; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.cred-card a::after { content: ""; position: absolute; inset: 0; } /* 카드 전체 클릭(stretched link) */
.cred-open { position: absolute; top: .6rem; right: .6rem; padding: .22rem .55rem; font-size: .72rem; font-weight: 700; line-height: 1; color: var(--muted); background: rgba(255,255,255,.92); border: 1px solid var(--border); border-radius: 999px; pointer-events: none; } /* 호버 없이 보이는 '원본 ↗' 어포던스 */
.cred-card:hover .cred-open { color: var(--accent-ink); }
.cred-card a { display: block; flex: 0 0 auto; min-height: 0; line-height: 0; aspect-ratio: 3 / 4; background: #fff; } /* min-height:0 — img 전이 최소치(비율 0.731 등)가 3/4 박스를 이기는 것 차단 */
.cred-card.wide { grid-column: span 2; }
.cred-card.wide a { flex: 1 1 0px; min-height: 0; aspect-ratio: auto; } /* 행 높이(세로형 박스)에 정합 — 자체 intrinsic으로 행을 키우지 않음 */
.cred-card.wide figcaption { flex: 0 0 auto; }
.cred-card img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s; } /* contain: 비율 무손상, 여백은 흰 박스에 흡수 */
.cred-card:hover img { transform: scale(1.03); }
.cred-card figcaption { padding: .75rem .9rem 1rem; font-size: .9rem; font-weight: 600; color: var(--fg); line-height: 1.45; flex: 1; min-height: 3.4rem; word-break: keep-all; text-wrap: balance; } /* flex:1=스트레치 흡수. display:flex 금지 — inline span 사이 공백이 flex 아이템화로 소거됨(2026-07-11 ISO 캡션 회귀) */
@media (max-width: 916px) { /* 916 = 3열 성립 하한(콘텐츠 884.8px) 실측 경계 */
  .cred-grid { grid-template-columns: repeat(2, 1fr); }
  .cred-card.wide a { flex: none; aspect-ratio: var(--ar, 1.55); } /* 2열에선 wide가 전폭 단독행 — 세로형 기준높이가 없으므로 원비율 */
}
@media (max-width: 640px) {
  .cred-grid { gap: .9rem; }
}
/* credentials 페이지 서두(WP 본문) — page-head 아래 좌정렬 리드 */
.page-intro { margin: .2rem 0 0; color: var(--muted); }
.page-intro p { margin: 0; }

/* ============================ post list (home/archive) ============================ */
.page-head { padding: 2.5rem 0 1rem; }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.02em; margin: 0 0 .4rem; }
.page-head p { color: var(--muted); margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.4rem; padding: 3rem 0; } /* 상하 대칭 여백 리듬 */
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 21 / 9; object-fit: cover; object-position: top; width: 100%; background: var(--surface-2); } /* 커버 중앙 빈공간 크롭 — 제목·라벨은 상단 */
.card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card .cat-badge { align-self: flex-start; }
.card h2 { font-size: 1.15rem; line-height: 1.35; margin: 0; }
.card h2 a { color: var(--fg); text-decoration: none; }
.card h2 a:hover { color: var(--accent-ink); }
.card .excerpt { color: var(--fg-soft); font-size: .92rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* 토스식 절제 — 발췌 2줄 클램프 */
.card .meta { margin-top: auto; color: var(--muted); font-size: .82rem; }

/* WP 코어 접근성 텍스트(예: "글 페이지 매김" h2) 시각 숨김 — 미정의 시 그대로 노출되는 사고 방지 */
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 페이지네이션 — 토스급 원형 필 (숫자·화살표 동일 44px 타깃, current만 accent 채움) */
.pagination { padding: 1.5rem 0 3.5rem; }
.pagination .nav-links { display: flex; gap: .5rem; justify-content: center; align-items: center; }
.pagination .page-numbers {
  display: inline-grid; place-items: center;
  min-width: 2.75rem; height: 2.75rem; padding: 0 .5rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--fg-soft);
  font-weight: 600; text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent-ink); }
.pagination .current { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); font-weight: 800; }
.pagination .dots { border: 0; background: transparent; }

/* ============================ footer ============================ */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 3.5rem; }
.site-footer .bar { padding: 2rem 0; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.site-footer a { color: var(--fg-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent-ink); }
.footer-biz { flex-basis: 100%; border-top: 1px solid var(--border); padding-top: 1rem; }
.footer-legal { display: flex; gap: 1rem; margin-bottom: .5rem; font-weight: 600; }
.biz-line { margin: 0; font-size: .8rem; line-height: 1.7; color: var(--muted); }
.footer-social { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-weight: 600; }

/* ============================ responsive ============================ */
@media (max-width: 640px) {
  .post-nav, .card-grid { grid-template-columns: 1fr; }
  .site-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: .8rem; flex-wrap: nowrap; }
  .site-nav a { white-space: nowrap; }
  body { font-size: 1rem; }
}

/* wide screens: TOC as a sticky companion rail on single posts */
@media (min-width: 1080px) {
  .single-layout { display: grid; grid-template-columns: 1fr minmax(0, var(--measure)) 1fr; gap: 2rem; align-items: start; }
  .single-layout .entry { grid-column: 2; max-width: none; }
  .single-layout .rail { grid-column: 3; position: sticky; top: 5rem; align-self: start; font-size: .9rem; }
  .single-layout .rail .ap-toc-rail { background: transparent; border: 0; padding: 0; }
}

/* -------- 홈 히어로 · 신뢰(trust) 스트립 -------- */
.home-hero {
  position: relative; overflow: hidden;
  padding: clamp(3.2rem, 9vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
}
/* 토스인사이트식 동심원 리플 — 순수 CSS, 은은하게 */
.home-hero::before {
  content: ""; position: absolute; inset: -40% -20%; z-index: -1; pointer-events: none;
  background: repeating-radial-gradient(circle at 72% 40%,
    color-mix(in srgb, var(--accent) 7%, transparent) 0 90px,
    transparent 90px 200px);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.hero-eyebrow { margin: 0 0 .6rem; font-size: .82rem; font-weight: 700; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }
/* 홈 히어로 제목 — .hero-title(single 다크용 #f2f5f8)와 클래스 충돌로 밝은 배경에 흰 글자가 되던 버그 수정 */
.home-hero .hero-title {
  margin: 0 0 .85rem; color: var(--fg);
  font-size: clamp(2.1rem, 5.8vw, 3.6rem);
  line-height: 1.1; letter-spacing: -.025em; font-weight: 800;
  max-width: none;
}
.hero-sub { margin: 0; max-width: 44ch; font-size: clamp(1rem, 2.3vw, 1.18rem); line-height: 1.65; color: var(--fg-soft); text-wrap: balance; } /* balance=줄 길이 균형 + 마크업의 NBSP·word-joiner로 복합어 보호 */
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0 0; }
.hero-cta a, .cs-actions a { display: inline-flex; align-items: center; padding: .62rem 1.1rem; border-radius: 8px; font-size: .95rem; font-weight: 600; text-decoration: none; transition: transform .12s ease, background .12s ease, border-color .12s ease; }
.hero-cta a:hover, .cs-actions a:hover { transform: translateY(-1px); }
.hero-cta .btn-primary, .cs-actions .btn-primary { background: var(--accent); color: var(--accent-contrast); }
.hero-cta .btn-primary:hover, .cs-actions .btn-primary:hover { background: var(--accent-ink); }
.hero-cta .btn-ghost, .cs-actions .btn-ghost { border: 1px solid var(--border); color: var(--fg); }
.hero-cta .btn-ghost:hover, .cs-actions .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.trust-strip { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 1.9rem 0 0; padding: 0; list-style: none; }
.trust-strip li { display: flex; flex-direction: column; line-height: 1.25; }
.trust-strip li a { display: flex; flex-direction: column; color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.trust-strip li a:hover span, .trust-strip li a:focus-visible span { color: var(--accent-ink); text-decoration: underline; }
.trust-strip strong { font-size: 1.5rem; font-weight: 800; color: var(--fg); letter-spacing: -.01em; }
.trust-strip span { font-size: .8rem; color: var(--muted); }

/* -------- E-E-A-T 저자 바이라인 · 신뢰근거 라인 -------- */
.article-meta .byline a { color: var(--fg-soft); text-decoration: none; font-weight: 600; }
.article-meta .byline a:hover { color: var(--accent); }
.article-trust { margin: .55rem 0 0; font-size: .82rem; line-height: 1.4; }
.article-trust a { color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--border); padding-bottom: 1px; }
.article-trust a:hover { color: var(--accent); border-color: var(--accent); }

/* 신뢰 배지 스트립 — 아크링크 전문성(인증·특허·수상)을 히어로 아래에서 전면화 (E-E-A-T) */
.trust-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .9rem 0 0; list-style: none; padding: 0; }
.trust-badges li { margin: 0; display: contents; }
.trust-badges .tb {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 650; line-height: 1;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: .38rem .72rem; border-radius: 999px; white-space: nowrap;
}
.trust-badges .tb::before {
  content: "✓"; font-weight: 800; font-size: .72rem;
  color: var(--accent);
}
.trust-badges .tb-more {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  text-decoration: none; margin-left: .15rem;
  border-bottom: 1px dashed var(--border); padding-bottom: 1px;
}
.trust-badges .tb-more:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 640px) {
  .trust-badges { gap: .4rem; }
  .trust-badges .tb { font-size: .74rem; padding: .34rem .62rem; }
  .trust-badges .tb-more { flex-basis: 100%; margin-left: 0; margin-top: .1rem; }
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- 읽기 진행바 (상단 fixed, 경쟁사 전원 부재) ---- */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #fff));
  z-index: 60; transition: width .1s linear; pointer-events: none;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ---- 스크롤 fade-in ---- */
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade-in { opacity: 1; transform: none; } }

/* ---- 하단 저자 bio 카드 (E-E-A-T — YMYL 신뢰 결정타) ---- */
.author-bio {
  display: flex; gap: 1rem; align-items: flex-start;
  margin: 3rem 0 0; padding: 1.4rem 1.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.author-bio .ab-avatar {
  flex: 0 0 auto; width: 3.2rem; height: 3.2rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-ink));
  color: var(--accent-contrast); display: grid; place-items: center; font-weight: 800; font-size: 1.25rem;
}
.author-bio .ab-body { flex: 1; min-width: 0; }
.author-bio .ab-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.author-bio .ab-name { font-weight: 800; font-size: 1.05rem; color: var(--fg); margin-top: .15rem; }
.author-bio .ab-title { font-size: .85rem; color: var(--accent-ink); font-weight: 600; margin-top: .1rem; }
.author-bio .ab-desc { font-size: .9rem; color: var(--fg-soft); line-height: 1.65; margin: .55rem 0 .6rem; }
.author-bio .ab-link { font-size: .85rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.author-bio .ab-link:hover { text-decoration: underline; }

/* ---- 모바일 sticky 상담 바 (긴급 전환 항상 노출) ---- */
.sticky-cta { display: none; }
@media (max-width: 640px) {
  .sticky-cta {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    gap: .5rem; padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom, 0px));
    padding-right: 5rem; /* 우하단 채널톡 런처(실측 x316~358·폭42) 자리 확보 — 버튼 우끝 310, 런처 좌316 = 6px 여유 */
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
  }
  .sticky-cta a { flex: 1; text-align: center; padding: .78rem .5rem; border-radius: 11px; font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; }
  .sticky-cta .sc-call { background: var(--accent); color: var(--accent-contrast); } /* #fff 하드코딩은 다크 accent(6f8cff) 위 3.06 AA미달 — 토큰은 다크 6.19/라이트 5.85 */
  .sticky-cta .sc-diag { background: var(--surface-2); color: var(--accent-ink); border: 1px solid var(--border); }
  body.has-sticky-cta { padding-bottom: 4.6rem; }
}

/* ---- ❌ 하지마세요 / ✅ 이렇게하세요 대비 박스 (피해자 행동 교정) ---- */
.ap-dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.ap-dodont .dd-col { border-radius: var(--radius); padding: 1.1rem 1.2rem; border: 1px solid; }
.ap-dodont .dd-dont { background: color-mix(in srgb, #e5484d 8%, var(--surface)); border-color: color-mix(in srgb, #e5484d 32%, transparent); }
.ap-dodont .dd-do { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 34%, transparent); }
.ap-dodont .dd-head { font-weight: 800; font-size: .95rem; margin: 0 0 .7rem; display: flex; align-items: center; gap: .4rem; }
.ap-dodont .dd-dont .dd-head { color: color-mix(in srgb, #e5484d 72%, var(--fg)); } /* WCAG AA 4.5+ (82%=4.38 미달 실측) */
.ap-dodont .dd-do .dd-head { color: color-mix(in srgb, var(--ok) 82%, var(--fg)); }
.ap-dodont ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.ap-dodont li { font-size: .89rem; line-height: 1.55; color: var(--fg-soft); padding-left: 1.5rem; position: relative; margin: 0; }
.ap-dodont li strong { color: var(--fg); }
.ap-dodont .dd-dont li::before { content: "✕"; position: absolute; left: 0; top: 0; color: color-mix(in srgb, #e5484d 75%, var(--fg)); font-weight: 800; } /* raw #e5484d = 라이트 3.33 미달 실측 */
.ap-dodont .dd-do li::before { content: "✓"; position: absolute; left: 0; top: 0; color: color-mix(in srgb, var(--ok) 75%, var(--fg)); font-weight: 800; }
@media (max-width: 640px) { .ap-dodont { grid-template-columns: 1fr; gap: .7rem; } }

/* ---- 벽문단 분해: li 내부 중첩 리스트(리드 아래 세부 컷) ---- */
.entry li > ul { margin: .5rem 0 .25rem; padding-left: 1.1rem; }
.entry li > ul > li { font-size: .95em; color: var(--fg-soft); }
.entry li > ul > li + li { margin-top: .35rem; }
.entry li > ul > li::marker { color: var(--muted); }

/* 전화번호 tel: 링크 — 본문 톤 유지(파란 링크 대신 굵은 잉크 + 은은한 밑줄) */
.entry a[href^="tel:"] { color: var(--fg); font-weight: 700; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---- 줄바꿈 원자 보호: 전화번호·URL·시간대는 한 덩어리로 ---- */
.kp { white-space: nowrap; }

/* ---- 몰입 리듬: 본문 리스트 항목 간 숨 + 모바일 리드 블록(만화 컷 리듬) ---- */
.entry > ul > li + li, .entry > ol > li + li { margin-top: .55rem; }
@media (max-width: 640px) {
  .entry > ul > li > strong:first-child { display: block; margin-bottom: .15rem; } /* 기관명·핵심어가 컷 제목처럼 서고 세부가 아래로 */
  .entry > ul > li { line-height: 1.7; }
}

/* ---- 번호 스텝 카드 (긴급 행동 우선순위 — uriweb '지금 당장 할 일' 흡수) ---- */
.ap-steps { display: grid; gap: .8rem; margin: 1.5rem 0; }
.ap-steps .step { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.ap-steps .step-n { flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.ap-steps .step-b { flex: 1; min-width: 0; }
.ap-steps .step-t { font-weight: 700; color: var(--fg); font-size: .99rem; margin-bottom: .28rem; }
.ap-steps .step-d { font-size: .89rem; color: var(--fg-soft); line-height: 1.62; }

/* ---- 많이 읽는 글 (toss.tech 번호 랭킹 — 조회수 임계 충족 시 자동 노출) ---- */
.popular { margin: 1.6rem 0 0; }
.popular h2 { font-size: 1.25rem; margin: 0 0 .8rem; }
.popular-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.popular-list a { display: flex; gap: .85rem; align-items: flex-start; padding: .75rem .9rem; border-radius: var(--radius-sm); text-decoration: none; transition: background .15s; }
.popular-list a:hover { background: var(--surface); }
.popular-list .pr-n { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.popular-list .pr-t { display: block; font-weight: 700; color: var(--fg); line-height: 1.4; }
.popular-list .pr-m { display: block; font-size: .8rem; color: var(--muted); margin-top: .15rem; }

/* ---- 홈 카테고리 탭 (tossinsight — 카테고리 2개+ 시 자동 노출, 정적 slug URL) ---- */
.home-tabs { display: flex; gap: 1.4rem; margin-top: 1.6rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.home-tabs a { padding: .6rem .1rem .7rem; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.home-tabs a:hover { color: var(--fg); }
.home-tabs a.is-active { color: var(--fg); font-weight: 800; border-bottom-color: var(--fg); }

/* ---- 게시판(archive) 히어로 배너 — tossinsight reports식 라운드 그라데이션 ---- */
.archive-hero {
  position: relative; overflow: hidden; text-align: center;
  margin: 1.25rem 0 .5rem; padding: clamp(2.4rem, 6vw, 4.2rem) 1.5rem;
  border-radius: var(--radius);
  background:
    radial-gradient(60% 120% at 30% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(50% 100% at 75% 80%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 65%),
    var(--surface);
  border: 1px solid var(--border);
}
.archive-hero .ah-eyebrow { margin: 0 0 .4rem; font-size: .88rem; color: var(--muted); font-weight: 600; }
.archive-hero h1 { margin: 0; font-size: clamp(1.6rem, 4.2vw, 2.5rem); letter-spacing: -.02em; }
.archive-hero .ah-desc { margin: .7rem auto 0; max-width: 52ch; color: var(--fg-soft); }

/* ---- 플랫폼별 가이드 스트립 (아크링크 guide 자산 크로스링크) ---- */
.guide-strip { margin: 3rem 0 0; padding: 1.5rem 1.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.guide-strip h2 { margin: 0 0 .3rem; font-size: 1.35rem; }
.guide-strip .gs-sub { margin: 0 0 1rem; font-size: .9rem; color: var(--muted); }
.guide-strip .gs-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.guide-strip .gs-links a {
  padding: .5rem .95rem; border-radius: 999px; text-decoration: none;
  font-size: .88rem; font-weight: 600; color: var(--fg-soft);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: color .15s, border-color .15s;
}
.guide-strip .gs-links a:hover { color: var(--accent-ink); border-color: var(--accent); }

/* 다크모드 폴리시: CTA 상단 그라데이션 라인 과광 톤다운 */
@media (prefers-color-scheme: dark) {
  .ap-cta::before, .golden-cta::before { opacity: .55; }
}
:root[data-theme="dark"] .ap-cta::before,
:root[data-theme="dark"] .golden-cta::before { opacity: .55; }

/* 모바일 폴리시: trust-strip 고아 줄바꿈 → 2×2 균형, 터치 타깃 44px 근접화 */
@media (max-width: 640px) {
  .trust-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 1rem; }
  .site-nav a { padding: .55rem .15rem; }
  .footer-social a { padding: .5rem 0; display: inline-block; }
  .trust-badges .tb-more { padding: .5rem 0 1px; }
  .ap-toc a { padding: .4rem 0 .4rem .7rem; }
}

/* ---- 관련글 캐러셀 스윕 화살표: 좌→우 통과하는 반투명 ››› (모바일, 3회 후 정지) ---- */
@media (max-width: 640px) {
  .related { position: relative; }
  .related.sweep::after {
    content: "\203A\203A\203A"; /* ››› */
    position: absolute; z-index: 2; top: 55%; left: -20%;
    transform: translateY(-50%);
    font-size: 2.8rem; font-weight: 800; letter-spacing: -.08em; line-height: 1;
    color: var(--accent); opacity: 0; pointer-events: none;
    text-shadow: 0 1px 10px color-mix(in srgb, var(--accent) 35%, transparent);
    animation: related-sweep 2.4s ease-in-out .4s 3;
  }
}
@keyframes related-sweep {
  0%   { left: -20%; opacity: 0; }
  18%  { opacity: .45; }
  82%  { opacity: .45; }
  100% { left: 104%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .related.sweep::after { animation: none; opacity: 0; }
}

/* ---- 2026-07-11 전영역 스위프: 홈 도선·검색 진입점·공유 ---- */
.home-sec-h { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin: 3rem 0 1rem; } /* 카드 제목(18.4px/700)과 위계 분리 + 위>아래 비대칭 여백으로 소속 그리드에 결합 */
.start-here { margin-top: .4rem; }
.crisis-strip { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 1.4rem; margin: 2.6rem auto 0; padding: 1.4rem 1.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.crisis-strip p { margin: 0; font-weight: 700; flex: 1 1 16rem; }
.crisis-strip .cs-lead { display: block; font-size: .95rem; font-weight: 500; color: var(--fg-soft); margin-top: .35rem; line-height: 1.6; word-break: keep-all; }
.crisis-strip .cs-sub { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); margin-top: .45rem; line-height: 1.55; word-break: keep-all; }
.crisis-strip .cs-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* FAQ 허브 하단 마감 CTA — 상단 crisis-strip과 톤 차별(경보 아닌 안내), 중앙정렬 */
.faq-close-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.4rem; margin: 2.6rem 0 0; padding: 1.6rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.faq-close-cta p { margin: 0; flex: 1 1 20rem; line-height: 1.65; word-break: keep-all; }
.faq-close-cta .cs-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
@media (max-width: 640px) { .search-toggle { display: none; } } /* 헤더 폭 잠식으로 '인증·수상' 내비 잘림(390px 실측 10.3px 노출) — 모바일 검색은 무결과·404·아카이브 폼이 담당 */
.hdr-search { border-top: 1px solid var(--border); background: var(--surface); }
.hdr-search .wrap { padding-block: .8rem; }
.noresults .search-form { margin-top: 1rem; }
.noresults .pill-nav { margin-top: 1rem; }
.ap-share { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--fg-soft); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.ap-share:hover { color: var(--accent-ink); border-color: var(--accent); }
.ap-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 5.2rem); transform: translateX(-50%) translateY(8px); background: var(--fg); color: var(--bg); padding: .6rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 70; }
.ap-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.home-hero.paged { padding-block: 1.8rem; }
.home-hero.paged .hero-title { font-size: clamp(1.5rem, 3vw, 2rem); }

/* ---- 2026-07-11 스위프 2회차: 미니 목차 레일·통계 타일 ---- */
.toc-rail { display: none; }
@media (min-width: 1280px) {
  .toc-rail { display: block; position: fixed; top: 108px; right: 32px; width: 224px; max-height: calc(100vh - 170px); overflow-y: auto; font-size: .82rem; z-index: 30; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .toc-rail.is-on { opacity: 1; pointer-events: auto; } /* JS 게이트: 협폭 본문 구간에서만 — wrap 폭 섹션과의 겹침 소거 */
  .toc-rail .tr-h { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
  .toc-rail ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); counter-reset: aptr; }
  .toc-rail li { counter-increment: aptr; }
  .toc-rail a { display: block; padding: .3rem 0 .3rem .7rem; color: var(--muted); text-decoration: none; line-height: 1.45; border-left: 2px solid transparent; margin-left: -2px; transition: color .15s, border-color .15s; }
  .toc-rail a::before { content: counter(aptr, decimal-leading-zero) " "; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
  .toc-rail a.is-active { color: var(--accent-ink); border-left-color: var(--accent); font-weight: 600; }
  .toc-rail a:hover { color: var(--fg); }
}
.start-here .card { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); } /* 시작 가이드 우선순위 시각 처리(순번은 상황≠순서라 미채택) */

/* FAQ 허브 (page-faq) — answer-first Q&A 집약 pillar */
.faq-hub-head { max-width: var(--wrap); margin: 2.2rem auto .2rem; }
.faq-hub-title { font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--fg); }
.faq-hub-hint { font-size: .9rem; color: var(--muted); margin: .25rem 0 0; }
.faq-hub { max-width: var(--wrap); margin: .9rem auto 3rem; display: grid; gap: .55rem; }
.faq-hub-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .12s ease, background .12s ease; }
.faq-hub-item[open] { border-color: var(--accent); background: var(--bg); }
.faq-hub-item > summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: .65rem; padding: 1.05rem 1.3rem; font-size: 1.04rem; font-weight: 700; color: var(--fg); line-height: 1.45; word-break: keep-all; }
.faq-hub-item > summary::-webkit-details-marker { display: none; }
.faq-hub-item > summary::before { content: "Q"; flex: none; width: 1.55rem; height: 1.55rem; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-ink); border-radius: 7px; font-size: .8rem; font-weight: 800; margin-top: .02rem; }
.faq-hub-item > summary::after { content: ""; flex: none; margin-left: auto; width: .58rem; height: .58rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .18s ease; margin-top: .3rem; }
.faq-hub-item[open] > summary::after { transform: rotate(-135deg); }
.faq-hub-item > summary:hover { color: var(--accent-ink); }
.faq-hub-body { padding: 0 1.3rem 1.2rem 3.5rem; }
.faq-hub-a { margin: 0 0 .7rem; color: var(--fg-soft); line-height: 1.7; }
.faq-hub-more { display: inline-flex; align-items: center; font-size: .88rem; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.faq-hub-more:hover { text-decoration: underline; }

/* 홈 FAQ 티저 */
.home-faq { margin: 2.5rem auto 0; }
.home-faq-list { display: grid; gap: .6rem; margin-top: .3rem; }
.home-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; }
.home-faq-item summary { font-weight: 700; cursor: pointer; color: var(--fg); list-style: none; }
.home-faq-item summary::-webkit-details-marker { display: none; }
.home-faq-item summary::before { content: "Q "; color: var(--accent-ink); font-weight: 800; }
.home-faq-item[open] summary { margin-bottom: .5rem; }
.home-faq-item p { margin: 0; color: var(--fg-soft); line-height: 1.7; }
.home-faq-all { display: inline-flex; margin-top: 1rem; font-weight: 700; color: var(--accent-ink); text-decoration: none; }
.home-faq-all:hover { text-decoration: underline; }
