@charset "utf-8";
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");
@import url("https://cdn.jsdelivr.net/gh/joungkyun/font-d2coding@1.3.2/d2coding.css");

/*
 * CONTENTS
 * 01. Tokens
 * 02. Reset
 * 03. Header
 * 04. Layout
 * 05. Covers (home)
 * 06. Post list
 * 07. Post (article page)
 * 08. Entry content (editor output)
 * 09. Tags, related, comments
 * 10. Sidebar
 * 11. Pagination
 * 12. Footer
 * 13. Responsive
 */

/* 01. Tokens */
:root {
  --blue: #3182F6;
  --blue-dark: #1B64DA;
  --blue-50: #E8F3FF;
  --grey-900: #191F28;
  --grey-800: #333D4B;
  --grey-700: #4E5968;
  --grey-600: #6B7684;
  --grey-500: #8B95A1;
  --grey-400: #B0B8C1;
  --grey-300: #D1D6DB;
  --grey-200: #E5E8EB;
  --grey-100: #F2F4F6;
  --grey-50: #F9FAFB;
  --white: #FFFFFF;

  /* 서체: 이 세 줄만 바꾸면 블로그 전체가 바뀝니다 */
  --font: "IBM Plex Sans KR", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: var(--font);
  --mono: "JetBrains Mono", D2Coding, "D2 coding", "SF Mono", Menlo, Consolas, monospace;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --header-h: 64px;
  --max-w: 1100px;
  --read-w: 760px; /* PC 고정형 광고 728px가 잘리지 않는 최소 폭 + 여유 */
}

/* 02. Reset */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-800);
  background: var(--white);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, figure, blockquote, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; vertical-align: top; border: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
hr { display: none; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
::selection { background: #C9E2FF; color: var(--grey-900); }

/* 토스식 눌림 피드백: 누르는 순간 살짝 작아진다 */
.btn-primary, .btn-weak, .btn-text, .round-btn, .icon-btn, .search-submit,
.chip, .tag-items a, .tag-cloud a, .page-num, .page-arrow,
.hero-card, .feature-card, .card, .post-item a, #gnb li a {
  transition: transform .12s ease, background-color .15s ease, color .15s ease;
}
.btn-primary:active, .btn-weak:active, .btn-text:active, .round-btn:active, .icon-btn:active,
.search-submit:active, .chip:active, .tag-items a:active, .tag-cloud a:active,
.page-num:active, .page-arrow:active, #gnb li a:active { transform: scale(0.96); }
.hero-card:active, .feature-card:active, .card:active, .post-item a:active { transform: scale(0.985); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  *:active { transform: none !important; }
}

.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: 16px; top: -48px; z-index: 1000;
  padding: 10px 16px; border-radius: var(--radius-s);
  background: var(--grey-900); color: var(--white); font-weight: 600; font-size: 14px;
}
.skip-link:focus { top: 12px; }

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: 12px;
  background: var(--blue); color: var(--white); font-weight: 600; font-size: 15px;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-small { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn-weak {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: 10px;
  background: var(--blue-50); color: var(--blue-dark); font-weight: 600; font-size: 14px;
  white-space: nowrap;
}
.btn-weak:hover { background: #D6E8FF; }
.btn-text {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--grey-600); white-space: nowrap;
}
.btn-text:hover { background: var(--grey-100); color: var(--grey-800); }

.section-title {
  font-family: var(--font-display);
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}

/* 03. Header */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  transition: box-shadow .2s;
}
#header.is-scrolled { box-shadow: 0 1px 0 var(--grey-200); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: var(--max-w);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 24px;
}

.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { height: 26px; width: auto; }
.logo-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}
.logo-text::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--blue);
}

#gnb { flex: 1; }
#gnb ul { display: flex; gap: 4px; }
#gnb li a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  font-size: 15px;
  font-weight: 600;
  color: var(--grey-600);
}
#gnb li a:hover { background: var(--grey-100); color: var(--grey-900); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-cta { margin: 0 6px 0 2px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; color: var(--grey-700);
}
.icon-btn:hover { background: var(--grey-100); }
#menu-toggle { display: none; }

.search-bar {
  display: none;
  border-top: 1px solid var(--grey-200);
  background: var(--white);
}
.search-bar.is-open { display: block; }
.search-inner {
  display: flex;
  gap: 8px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
}
.search-inner input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--grey-100);
  font-size: 16px;
  color: var(--grey-900);
  -webkit-appearance: none;
}
.search-inner input::placeholder { color: var(--grey-500); }
.search-inner input:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--white); }
.search-submit {
  height: 48px; padding: 0 20px; border-radius: 12px;
  background: var(--blue); color: var(--white); font-weight: 600;
}
.search-submit:hover { background: var(--blue-dark); }

/* 04. Layout */
#container { min-height: 60vh; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 0;
}

/* 글 상세는 사이드바 없이 읽기 폭으로 가운데 정렬 */
#tt-body-page .layout,
.layout:has(.post) {
  grid-template-columns: minmax(0, var(--read-w));
  justify-content: center;
  padding-top: 64px;
}
#tt-body-page #aside,
.layout:has(.post) #aside { display: none; }

/* 05. Covers (home) */
.covers {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 0;
}
.cover + .cover { margin-top: 64px; }

/* 추천 글 캐러셀 */
.hero { position: relative; }
.hero-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-card {
  flex: 0 0 min(680px, 86%);
  scroll-snap-align: start;
  display: block;
}
.hero-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-l);
  background: var(--grey-100);
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { display: block; padding: 22px 4px 0; }
.hero-title {
  font-family: var(--font-display);
  display: block;
  margin-top: 12px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}
.hero-summary {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--grey-600);
}
.hero-summary:empty { display: none; }
.hero-controls { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.round-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grey-100); color: var(--grey-700);
}
.round-btn:hover { background: var(--grey-200); }

/* 가로 카드 */
.feature-list { display: grid; gap: 40px; }
.feature-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.feature-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-l);
  background: var(--grey-100);
}
.feature-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feature-title {
  font-family: var(--font-display);
  display: block;
  margin: 12px 0 10px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}
.feature-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.7;
  color: var(--grey-600);
}
.feature-card:hover .feature-title { color: var(--blue-dark); }

/* 카드 그리드 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 20px;
}
.card { display: block; }
.card-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
  border-radius: var(--radius-m);
  background: var(--grey-100);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-title { color: var(--blue-dark); }
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--grey-900);
}
.card-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey-600);
}

/* 06. Post list */
.list-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 12px;
}
.list-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}
.list-count { font-size: 15px; color: var(--grey-500); }

.post-item a {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0 -20px;
  padding: 24px 20px;
  border-radius: var(--radius-l);
}
.post-item a:hover { background: var(--grey-50); }
.post-item-text { flex: 1; min-width: 0; display: block; }
.post-item-category {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}
.post-item-title {
  font-family: var(--font-display);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}
.post-item-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--grey-600);
}
.post-item-date { display: block; margin-top: 12px; font-size: 13px; color: var(--grey-500); }
.post-item-thumb {
  flex-shrink: 0;
  overflow: hidden;
  width: 220px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-m);
  background: var(--grey-100);
}
.post-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 07. Post (article page) */
.post-header { margin-bottom: 56px; }
.post-header .chip { margin-bottom: 16px; }
.post-header a.chip:hover { background: #D6E8FF; }
.post-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.33;
  letter-spacing: -0.025em;
  color: var(--grey-900);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 24px;
  font-size: 15px;
  color: var(--grey-500);
}
.author-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--grey-100); }
.author-name { font-weight: 600; color: var(--grey-800); }

.author-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 48px;
  padding: 28px;
  border-radius: var(--radius-l);
  background: var(--grey-50);
}
.author-card-avatar { flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author-card-text { flex: 1; min-width: 0; }
.author-card-label { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 600; color: var(--blue); }
.author-card-text strong { display: block; font-size: 18px; font-weight: 700; color: var(--grey-900); }
.author-card-text p { margin-top: 4px; font-size: 15px; line-height: 1.6; color: var(--grey-600); }
.author-card-links { display: flex; gap: 8px; }
.post-meta a { color: var(--grey-600); }

.protected-form { padding: 64px 0; text-align: center; }
.protected-form p { margin-bottom: 20px; color: var(--grey-600); }
.protected-form input {
  width: 220px; height: 44px; margin-right: 8px; padding: 0 14px;
  border: 0; border-radius: 12px; background: var(--grey-100);
}

/* 07-2. Detail page: 진행 바, 목차, 공유, 이전/다음 글 */
#header { position: sticky; }
.read-progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; overflow: hidden; pointer-events: none; opacity: 0;
}
.is-detail .read-progress { opacity: 1; }
.read-progress span {
  display: block; height: 100%;
  background: var(--blue);
  transform: scaleX(0); transform-origin: 0 50%;
}

.read-time { color: var(--grey-500); }
.post-date, .read-time, .post-item-date {
  font-family: var(--mono);
  font-size: 0.9em;
  letter-spacing: -0.01em;
}

.post-main { position: relative; }
#article-view h2, #article-view h3 { scroll-margin-top: calc(var(--header-h) + 24px); }

/* 목차: 좁은 화면은 접이식 카드 */
.toc-card {
  margin-bottom: 48px;
  padding: 18px 22px;
  border-radius: var(--radius-m);
  background: var(--grey-50);
}
.toc-card summary {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; color: var(--grey-900);
  cursor: pointer; list-style: none;
}
.toc-card summary::-webkit-details-marker { display: none; }
.toc-card summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 4px;
  border-right: 2px solid var(--grey-500); border-bottom: 2px solid var(--grey-500);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.toc-card[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.toc-card .toc-list { margin-top: 14px; }
.toc-card .toc-list a { display: block; padding: 5px 0; font-size: 15px; line-height: 1.5; color: var(--grey-700); }
.toc-card .toc-list a:hover { color: var(--blue-dark); }
.toc-card .toc-h3 a { padding-left: 14px; font-size: 14px; color: var(--grey-600); }

/* 목차: 넓은 화면은 본문 오른쪽에 고정 */
.toc-side { display: none; }
.toc-title { margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--grey-500); }
.toc-side .toc-list { border-left: 2px solid var(--grey-100); }
.toc-side .toc-list a {
  display: block;
  margin-left: -2px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey-500);
  transition: color .15s, border-color .15s;
}
.toc-side .toc-h3 a { padding-left: 26px; font-size: 13px; }
.toc-side .toc-list a:hover { color: var(--grey-800); }
.toc-side .toc-list a.is-active { border-left-color: var(--blue); color: var(--grey-900); font-weight: 600; }

/* 코드 복사 */
.code-wrap { position: relative; }
.code-copy {
  position: absolute; top: 10px; right: 10px;
  height: 30px; padding: 0 12px; border-radius: 8px;
  background: var(--white); box-shadow: 0 1px 3px rgba(0, 29, 58, 0.12);
  font-size: 12.5px; font-weight: 600; color: var(--grey-700);
  opacity: 0; transition: opacity .15s, transform .12s;
}
.code-wrap:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:active { transform: scale(0.94); }
@media (hover: none) { .code-copy { opacity: 1; } }

/* 공유 */
.post-actions { margin-top: 80px; text-align: center; }
.post-actions-text { margin-bottom: 14px; font-size: 15px; color: var(--grey-600); }
.post-actions .btn-weak { gap: 6px; height: 48px; padding: 0 22px; border-radius: 14px; font-size: 15px; }
#article-view .container_postbtn { margin-top: 56px; }

/* 이전 글, 다음 글 */
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.post-nav-item {
  display: block;
  padding: 20px 22px;
  border-radius: var(--radius-l);
  background: var(--grey-50);
  transition: transform .12s ease, background-color .15s;
}
.post-nav-item:hover { background: var(--grey-100); }
.post-nav-item:active { transform: scale(0.985); }
.post-nav-item.next { grid-column: 2; text-align: right; }
.post-nav-label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--grey-500); }
.post-nav-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--grey-900);
}

/* 함께 읽으면 좋은 글 */
.related-item {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 0 -20px; padding: 16px 20px;
  border-radius: var(--radius-l);
  transition: transform .12s ease, background-color .15s;
}
.related-item:hover { background: var(--grey-50); }
.related-item:active { transform: scale(0.985); }
.related-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--grey-900);
}
.related-thumb {
  flex-shrink: 0; overflow: hidden; width: 96px; aspect-ratio: 4 / 3;
  border-radius: 12px; background: var(--grey-100);
}
.related-thumb:not(:has(img)) { display: none; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 토스트 */
.toast {
  position: fixed; left: 50%; bottom: calc(32px + env(safe-area-inset-bottom, 0px)); z-index: 1000;
  padding: 14px 22px; border-radius: 16px;
  background: rgba(25, 31, 40, 0.92); color: var(--white);
  font-size: 15px; font-weight: 600;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1280px) {
  .toc-card { display: none; }
  .toc-side {
    display: block;
    position: absolute; top: 0; left: calc(100% + 40px);
    width: 200px; height: 100%;
  }
  .toc-sticky {
    position: sticky; top: calc(var(--header-h) + 40px);
    max-height: calc(100vh - var(--header-h) - 80px);
    overflow-y: auto; scrollbar-width: none;
  }
  .toc-sticky::-webkit-scrollbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 07-3. 광고 영역
 * 애드핏은 감싸는 영역이 광고 폭(예: 728px)보다 좁으면 광고를 그리지 않는다.
 * 광고 묶음이 어디에 들어가든 항상 한 줄 전체 폭을 쓰도록 고정한다. */
.revenue_unit_wrap,
.revenue_unit_wrap .revenue_unit_item {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}
.revenue_unit_wrap {
  clear: both;
  margin: 40px auto;
  overflow: visible;
  text-align: center;
}
.revenue_unit_wrap ins { margin-left: auto; margin-right: auto; }

/* 글 상단 정보줄(flex) 안에 광고가 들어오는 경우: 정보줄 아래 별도 한 줄로 */
.post-meta .revenue_unit_wrap {
  flex: 0 0 100%;
  order: 10;
  margin: 20px 0 0;
}

/* 08. Entry content (editor output) */
#article-view {
  min-height: 300px;
  padding: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0;
  color: var(--grey-800);
  word-break: keep-all;
  overflow-wrap: break-word;
}
#article-view > *:first-child { margin-top: 0; }

#article-view p,
#article-view p[data-ke-size] {
  margin: 0 0 24px;
  font-size: inherit;
  line-height: inherit;
}
#article-view p[data-ke-size='size14'] { font-size: 15px; }
#article-view p[data-ke-size='size18'] { font-size: 19px; }

#article-view h2,
#article-view h2[data-ke-size] {
  font-family: var(--font-display);
  margin: 64px 0 18px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}
#article-view h3,
#article-view h3[data-ke-size] {
  font-family: var(--font-display);
  margin: 44px 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}
#article-view h4,
#article-view h4[data-ke-size] {
  margin: 32px 0 12px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--grey-900);
}

#article-view a { color: var(--blue); text-decoration: none; font-weight: 500; }
#article-view a:hover { text-decoration: underline; }

#article-view strong, #article-view b { font-weight: 700; color: var(--grey-900); }

#article-view ul,
#article-view ol { margin: 0 0 24px; padding-left: 24px; }
#article-view ul li { list-style: disc outside; margin: 0 0 8px; padding: 0; line-height: inherit; }
#article-view ol li { list-style: decimal outside; margin: 0 0 8px; padding: 0; line-height: inherit; }
#article-view li > ul, #article-view li > ol { margin: 8px 0 0; }
#article-view li::marker { color: var(--grey-500); }

#article-view blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--grey-50);
  font-size: 17px;
  line-height: 1.8;
  color: var(--grey-700);
  text-align: left;
}
#article-view blockquote[data-ke-style='style1'] {
  padding: 40px 0 0;
  border: 0;
  border-radius: 0;
  background: url(https://t1.daumcdn.net/axz_keditor/dist/latest/image/blockquote-style1.svg) no-repeat 50% 0;
  text-align: center;
  font-size: 19px;
  font-weight: 600;
  color: var(--grey-900);
}
#article-view blockquote[data-ke-style='style2'] {
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--blue);
  border-radius: 0;
  background: none;
}
#article-view blockquote[data-ke-style='style3'] {
  padding: 20px 24px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--grey-50);
}
#article-view blockquote p { margin: 0 0 12px; }
#article-view blockquote p:last-child { margin-bottom: 0; }

/* 인라인 코드 */
#article-view code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--grey-100);
  font-family: var(--mono);
  font-size: 0.86em;
  font-variant-ligatures: none;
  color: var(--blue-dark);
}

/* 코드 블록 (라이트) */
#article-view pre {
  overflow-x: auto;
  margin: 0 0 28px;
  padding: 22px 24px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--grey-50);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
  font-variant-ligatures: none;
  color: var(--grey-900);
  white-space: pre;
  word-break: normal;
}
#article-view pre code,
#article-view pre code.hljs {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
  color: inherit;
  overflow: visible;
}

/* 표 */
#article-view .table-scroll { overflow-x: auto; margin: 0 0 28px; }
#article-view table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border: 0;
  font-size: 15px;
  line-height: 1.6;
}
#article-view table td,
#article-view table th {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--grey-100);
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
}
#article-view table:not(:has(thead)) tr:first-child td,
#article-view table th {
  background: var(--grey-50);
  font-weight: 600;
  color: var(--grey-700);
}

/* 구분선 (에디터 스타일) */
#article-view hr { display: block; height: 0; margin: 48px 0; border: 0; border-top: 1px solid var(--grey-200); }
#article-view hr[data-ke-style] {
  border: 0;
  margin: 40px auto;
  font-size: 0;
  line-height: 0;
  background: url(https://t1.daumcdn.net/axz_keditor/dist/latest/image/divider-line.svg);
  background-size: 200px 420px;
}
#article-view hr[data-ke-style='style1'] { background-position: center 0; width: 64px; height: 4px; padding: 20px; }
#article-view hr[data-ke-style='style2'] { background-position: center -48px; width: 64px; height: 3px; padding: 20px; }
#article-view hr[data-ke-style='style3'] { background-position: center -96px; width: 64px; height: 8px; padding: 18px 20px; }
#article-view hr[data-ke-style='style4'] { background-position: center -144px; width: 2px; height: 60px; padding: 0 51px; }
#article-view hr[data-ke-style='style5'] { background-position: center -208px; background-repeat: repeat-x; height: 2px; padding: 21px 0; }
#article-view hr[data-ke-style='style6'] { background-position: center -256px; background-repeat: repeat-x; height: 2px; padding: 21px 0; }
#article-view hr[data-ke-style='style7'] { background-position: center -304px; width: 200px; height: 19px; padding: 18px 20px 17px; }
#article-view hr[data-ke-style='style8'] { background-position: center -362px; width: 200px; height: 19px; padding: 18px 20px 17px; }

/* 이미지 */
#article-view figure { max-width: 100%; margin: 32px 0; clear: both; }
#article-view figure img { display: inline-block; max-width: 100%; height: auto; vertical-align: baseline; border-radius: var(--radius-m); }
#article-view figure img:not([width]) { width: 100%; }
#article-view iframe { max-width: 100%; }
#article-view figure.imageblock { display: table; position: relative; }
#article-view figure.imageblock.alignCenter { margin-left: auto; margin-right: auto; text-align: center; }
#article-view figure.imageblock.alignRight { margin-left: auto; text-align: right; }
#article-view figure.imageblock.floatLeft { float: left; margin: 0 24px 16px 0; }
#article-view figure.imageblock.floatRight { float: right; margin: 0 0 16px 24px; }
#article-view figure.imageblock.widthContent { display: block; }
#article-view figure.imageblock.widthContent img { width: 100%; }
#article-view figure figcaption {
  padding-top: 10px;
  caption-side: bottom;
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey-500);
  text-align: center;
}
#article-view figure.imagegridblock { width: 100%; }
#article-view figure.imagegridblock .image-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; }
#article-view figure.imagegridblock .image-container > span { margin-top: 2px; }
#article-view figure.imagegridblock img { margin: 0; height: inherit; }
#article-view figure.imagegridblock span img { width: 100%; }
#article-view span[data-lightbox] { cursor: zoom-in; }

/* 이미지 슬라이드 */
#article-view figure.imageslideblock { position: relative; font-size: 0; }
#article-view figure.imageslideblock div.image-container {
  position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden; max-width: 100%; min-height: 300px; max-height: 860px;
  margin: 0 auto; border-radius: var(--radius-m); background: var(--grey-900);
}
#article-view figure.imageslideblock div.image-container span.image-wrap { display: none; }
#article-view figure.imageslideblock div.image-container span.image-wrap.selected { display: inline; }
#article-view figure.imageslideblock div.image-container img { max-width: 100%; max-height: 100%; border-radius: 0; }
#article-view figure.imageslideblock .btn { display: none; }
#article-view figure.imageslideblock.ready .btn { display: inline-block; }
#article-view figure.imageslideblock div.image-container .btn {
  position: absolute; top: 50%; width: 60px; height: 60px; margin-top: -30px; border: 0; background: transparent;
}
#article-view figure.imageslideblock div.image-container .btn-prev { left: 0; }
#article-view figure.imageslideblock div.image-container .btn-next { right: 0; }
#article-view figure.imageslideblock div.image-container .btn span {
  display: inline-block; width: 40px; height: 40px; overflow: hidden; text-indent: -10000px;
  background-image: url('https://t1.daumcdn.net/tistory_admin/static/manage/post-editor/img_editor_content.svg');
  opacity: .5;
}
#article-view figure.imageslideblock div.image-container .btn .ico-prev { background-position: -220px 0; }
#article-view figure.imageslideblock div.image-container .btn .ico-next { background-position: -260px 0; }
#article-view figure.imageslideblock div.mark { height: 44px; text-align: center; }
#article-view figure.imageslideblock div.mark span {
  display: inline-block; width: 24px; height: 4px; margin: 20px 2px; border-radius: 2px;
  background: var(--grey-300); text-indent: -10000px; overflow: hidden; cursor: pointer;
}
#article-view figure.imageslideblock div.mark span:first-child { background: var(--grey-900); }

/* 파일 첨부 */
#article-view figure.fileblock {
  position: relative; width: 100%; max-width: 470px; height: 73px;
  border: 1px solid var(--grey-200); border-radius: var(--radius-m); background: var(--white);
}
#article-view figure.fileblock a { display: block; height: 100%; text-decoration: none; }
#article-view figure.fileblock .image {
  float: left; width: 30px; height: 30px; margin: 21px 16px 0 20px;
  background-image: url('https://t1.daumcdn.net/tistory_admin/static/manage/post-editor/img_editor_content.svg');
  background-position: 0 0;
}
#article-view figure.fileblock .desc { position: absolute; top: 4px; right: 60px; bottom: 0; left: 66px; }
#article-view figure.fileblock .filename { width: 100%; height: 20px; margin: 14px 0 0; font-size: 14px; color: var(--grey-900); }
#article-view figure.fileblock .name { display: block; overflow: hidden; max-width: 272px; height: 20px; white-space: nowrap; text-overflow: ellipsis; }
#article-view figure.fileblock .size { font-size: 12px; color: var(--grey-500); }
#article-view figure.fileblock a::after {
  content: ''; position: absolute; top: 21px; right: 22px; width: 30px; height: 30px;
  background-image: url('https://t1.daumcdn.net/tistory_admin/static/manage/post-editor/img_editor_content.svg');
  background-position: -40px 0;
}

/* 링크 미리보기 */
#article-view figure[data-ke-type='opengraph'] { margin: 24px 0; }
#article-view figure[data-ke-type='opengraph'] a {
  display: flex; align-items: center; overflow: hidden;
  border: 1px solid var(--grey-200); border-radius: var(--radius-m);
  color: var(--grey-900); text-decoration: none;
}
#article-view figure[data-ke-type='opengraph'] div.og-image {
  flex-shrink: 0; width: 180px; height: 180px; border-right: 1px solid var(--grey-200);
  background-size: cover; background-position: center;
}
#article-view figure[data-ke-type='opengraph'] div.og-image button { display: none; }
#article-view figure[data-ke-type='opengraph'] div.og-text { padding: 20px 24px; min-width: 0; }
#article-view figure[data-ke-type='opengraph'] p.og-title {
  margin: 0 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 18px; font-weight: 700; color: var(--grey-900);
}
#article-view figure[data-ke-type='opengraph'] .og-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0; font-size: 14px; line-height: 1.6; color: var(--grey-600);
}
#article-view figure[data-ke-type='opengraph'] .og-host { margin: 8px 0 0; font-size: 13px; color: var(--grey-500); }

/* 동영상 */
#article-view figure[data-ke-type='video'] { display: block; position: relative; text-align: center; }
#article-view figure[data-ke-type='video'] img { display: block; max-width: 100%; margin: 0 auto; }
#article-view figure[data-ke-type='video'] > iframe[width='0'][height='0'] { width: 860px; height: 484px; max-width: 100%; }

/* 접은 글 */
#article-view div[data-ke-type='moreLess'] {
  margin: 28px 0; padding: 18px 22px;
  border: 1px solid var(--grey-200); border-radius: var(--radius-m); background: var(--grey-50);
}
#article-view div[data-ke-type='moreLess'] .btn-toggle-moreless {
  font-size: 15px; font-weight: 600; color: var(--grey-700); text-decoration: none; cursor: pointer;
}
#article-view div[data-ke-type='moreLess'] .moreless-content { display: none; margin-top: 14px; }
#article-view div[data-ke-type='moreLess'].open .moreless-content { display: block; }
#article-view .moreless-content :first-child { margin-top: 0; }

/* 지도, 이모티콘 */
#article-view figure[data-ke-type='map'],
#article-view iframe[data-ke-type='map'] { display: block; margin: 0 auto; }
#article-view figure[data-ke-type=emoticon][data-ke-align=alignCenter] { text-align: center; }
#article-view figure[data-ke-type=emoticon][data-ke-align=alignRight] { text-align: right; }

/* 구 에디터 */
.btn_more, .btn_less {
  display: block; width: 100%; height: 21px; margin: 20px 0; border: 0; background: transparent;
  font-size: 14px; line-height: 14px; color: var(--grey-600); text-align: left;
}

/* 09. Tags, related, comments */
.post-tags { margin-top: 32px; }
.tag-items { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-items a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--grey-100);
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-700);
}
.tag-items a::before { content: "#"; margin-right: 1px; color: var(--grey-500); }
.tag-items a:hover { background: var(--blue-50); color: var(--blue-dark); }

.related { margin-top: 88px; }
.related .section-title { font-size: 22px; }

.comments { margin-top: 88px; }
.tt-comment-cont { font-family: var(--font); }
.tt-comment-cont .tt-box-total .tt_txt_g,
.tt-comment-cont .tt-box-total .tt_num_g { font-size: 17px; font-weight: 700; color: var(--grey-900); }
.tt-comment-cont .tt-wrap-cmt .tt-link-user { font-size: 15px; font-weight: 600; color: var(--grey-900); }
.tt-comment-cont .tt-wrap-cmt .tt_desc { font-size: 15px; line-height: 1.7; color: var(--grey-700); }
.tt-comment-cont .tt-wrap-cmt .tt_txt_g,
.tt-comment-cont .tt-link-comment .tt_num_g { color: var(--blue); }
.tt-comment-cont .tt-txt-mention { color: var(--blue-dark); }
.tt-comment-cont .tt-btn_register {
  height: 44px; border: 0; border-radius: 12px;
  background: var(--blue); color: var(--white); font-weight: 600;
}
.tt-comment-cont .tt-btn_register:hover,
.tt-comment-cont .tt-btn_register:focus { background: var(--blue-dark); color: var(--white); }

/* 태그 클라우드 페이지 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; padding: 32px 0; }
.tag-cloud a {
  padding: 8px 14px; border-radius: 999px; background: var(--grey-100);
  font-size: 15px; color: var(--grey-700);
}
.tag-cloud a:hover { background: var(--blue-50); color: var(--blue-dark); }
.tag-cloud a.cloud1 { font-weight: 700; color: var(--grey-900); }
.tag-cloud a.cloud2 { font-weight: 600; }

/* 10. Sidebar */
#aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.widget { margin-bottom: 48px; }
.widget-title {
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--grey-900);
}
.widget-list li a,
.widget-rank li a {
  display: block;
  overflow: hidden;
  padding: 7px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--grey-700);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.widget-list li a:hover,
.widget-rank li a:hover { color: var(--grey-900); }

.widget-rank { counter-reset: rank; }
.widget-rank li { counter-increment: rank; display: flex; align-items: baseline; gap: 12px; }
.widget-rank li::before {
  content: counter(rank);
  flex-shrink: 0;
  width: 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
}
.widget-rank li a { flex: 1; min-width: 0; }

.widget-comments li a { display: block; padding: 8px 0; }
.widget-comments .comment-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 14px; line-height: 1.55; color: var(--grey-700);
}
.widget-comments .comment-name { display: block; margin-top: 4px; font-size: 13px; color: var(--grey-500); }

/* 카테고리 ([##_category_list_##] 출력) */
.widget-category ul { list-style: none; margin: 0; padding: 0; }
.widget-category .tt_category > li > a { display: none; }
.widget-category a {
  display: block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--grey-700);
}
.widget-category a:hover { color: var(--grey-900); }
.widget-category .sub_category_list a { padding-left: 14px; font-size: 14px; color: var(--grey-600); }
.widget-category .c_cnt { margin-left: 4px; font-size: 13px; color: var(--grey-400); }

.widget-count .count-total {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}
.widget-count dl { margin-top: 8px; }
.widget-count dl div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--grey-600); }

/* 11. Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 56px 0 0;
}
.pagination .page-num,
.pagination .page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--grey-600);
}
.pagination .page-num:hover,
.pagination .page-arrow:hover { background: var(--grey-100); }
.pagination .page-num:has(.selected) { background: var(--blue-50); color: var(--blue-dark); }
.pagination .page-num:has(.selected):hover { background: var(--blue-50); }
.pagination .selected { font-weight: 700; }
.pagination .no-more-prev,
.pagination .no-more-next { visibility: hidden; }

/* 12. Footer */
#footer {
  margin-top: 140px;
  padding: 56px 0 64px;
  background: var(--grey-50);
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand .logo-text { font-size: 17px; }
.footer-brand p { margin-top: 10px; max-width: 360px; font-size: 14px; line-height: 1.6; color: var(--grey-600); }
.footer-cols { display: flex; gap: 72px; }
.footer-col h2 { margin-bottom: 12px; font-size: 14px; font-weight: 700; color: var(--grey-700); }
.footer-col li a { display: inline-block; padding: 4px 0; font-size: 14px; color: var(--grey-500); }
.footer-col li a:hover { color: var(--grey-800); }
.footer-copy { margin-top: 48px; font-size: 13px; color: var(--grey-500); }

.revenue_unit_wrap.position_list { max-width: var(--max-w); margin: 32px auto; padding: 0 24px; }

/* 13. Responsive */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  #aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 40px;
    padding: 40px 28px 0;
    border-radius: var(--radius-l);
    background: var(--grey-50);
  }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }

  .header-inner { gap: 12px; padding: 0 16px; }
  #menu-toggle { display: inline-flex; }
  .header-link, .header-cta { display: none; }
  #gnb {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 8px 16px 16px;
    background: var(--white);
    box-shadow: 0 12px 24px rgba(0, 29, 58, 0.08);
  }
  #gnb.is-open { display: block; }
  #gnb ul { flex-direction: column; gap: 0; }
  #gnb li a { padding: 14px 8px; font-size: 16px; }

  .search-inner { padding: 12px 16px; }

  .covers { padding: 24px 16px 0; }
  .cover + .cover { margin-top: 48px; }
  .hero-card { flex-basis: 88%; }
  .hero-title, .feature-title { font-size: 23px; }
  .hero-summary { font-size: 16px; }
  .feature-card { grid-template-columns: 1fr; gap: 16px; }
  .card-grid { gap: 28px 14px; }
  .card-title { font-size: 16px; }

  .layout { padding: 32px 16px 0; }
  #tt-body-page .layout,
  .layout:has(.post) { padding-top: 40px; }

  .list-title { font-size: 24px; }
  .post-item a { gap: 16px; margin: 0 -16px; padding: 20px 16px; align-items: flex-start; border-radius: 20px; }
  .post-item-title { font-size: 19px; }
  .post-item-summary { font-size: 14px; }
  .post-item-thumb { width: 96px; border-radius: 12px; }

  .post-title { font-size: 29px; }
  .post-header { margin-bottom: 40px; }
  .author-card { flex-wrap: wrap; padding: 24px; }
  .author-card-links { width: 100%; }
  .author-card-links .btn-weak { flex: 1; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav-item.next { grid-column: auto; text-align: left; }
  .post-actions { margin-top: 64px; }
  .related-item { margin: 0 -16px; padding: 14px 16px; }

  #article-view { font-size: 16.5px; }
  #article-view h2, #article-view h2[data-ke-size] { margin-top: 52px; font-size: 23px; }
  #article-view h3, #article-view h3[data-ke-size] { font-size: 20px; }
  #article-view pre { margin-left: -16px; margin-right: -16px; border-radius: 0; font-size: 13px; }
  #article-view figure.imageblock.floatLeft,
  #article-view figure.imageblock.floatRight { float: none; margin: 24px 0; }
  #article-view figure[data-ke-type='opengraph'] div.og-image { width: 96px; height: 96px; }
  #article-view figure[data-ke-type='opengraph'] .og-desc { display: none; }
  #article-view figure.imageslideblock div.image-container { min-width: 100%; }

  #aside { grid-template-columns: minmax(0, 1fr); padding: 32px 20px 0; }
  #footer { margin-top: 96px; padding: 44px 0 52px; }
  .footer-inner { padding: 0 16px; }
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-cols { gap: 56px; }
}
