:root {
  --navy: #0b2545;
  --navy-2: #134074;
  --blue: #3a86ff;
  --ink: #1a1a1a;
  --gray: #5b6470;
  --line: #e6e9ee;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --accent: #0a8754;
  --radius: 12px;
  --maxw: 1080px;
  --readw: 720px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 17px;
  word-break: keep-all;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--navy); color: #fff; border-radius: 8px; font-size: 17px; }
.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--gray); font-weight: 600; font-size: 15px; }
.site-nav a:hover, .site-nav a.active { color: var(--navy); text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }

/* Hero */
.hero { text-align: center; padding: 64px 0 40px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; border-radius: 0 0 24px 24px; margin-bottom: 8px; }
.hero h1 { font-size: 34px; margin: 0 0 12px; letter-spacing: -.02em; }
.hero p { max-width: 600px; margin: 0 auto 24px; color: #cdd7e6; font-size: 17px; }
.hero-cta { display: inline-block; background: #fff; color: var(--navy); font-weight: 700; padding: 12px 26px; border-radius: 999px; }
.hero-cta:hover { text-decoration: none; transform: translateY(-1px); }

/* Sections */
.home-section { margin: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.section-head a { font-size: 14px; font-weight: 600; color: var(--gray); }

/* Card grid */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 8px 24px rgba(11,37,69,.08); transform: translateY(-2px); }
.card-link { display: block; padding: 20px; height: 100%; }
.card-link:hover { text-decoration: none; }
.card-cat { display: inline-block; font-size: 12px; font-weight: 700; color: var(--navy-2); background: var(--bg-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.card-title { font-size: 18px; margin: 0 0 8px; color: var(--ink); line-height: 1.4; }
.card-desc { font-size: 14px; color: var(--gray); margin: 0 0 14px; line-height: 1.6; }
.card-meta { font-size: 12.5px; color: #9aa3af; }

/* Topics */
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.topic { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; color: var(--navy); background: var(--bg-soft); }
.topic:hover { text-decoration: none; border-color: var(--blue); }
.topic span { font-size: 26px; }

/* List page */
.list-header { padding: 36px 0 8px; }
.list-header h1 { font-size: 28px; margin: 0 0 8px; }
.list-header p { color: var(--gray); margin: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 40px 0; }
.pagination a { font-weight: 700; color: var(--navy); }
.page-info { color: var(--gray); font-size: 14px; }

/* Post */
.post { max-width: var(--readw); margin: 0 auto; padding: 8px 0 20px; }
.breadcrumb { font-size: 13px; color: var(--gray); padding: 20px 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--gray); }
.post-cats { margin-bottom: 12px; }
.cat-chip { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; background: var(--navy-2); padding: 4px 12px; border-radius: 999px; margin-right: 6px; }
.cat-chip:hover { text-decoration: none; background: var(--navy); }
.post-title { font-size: 30px; line-height: 1.35; letter-spacing: -.02em; margin: 0 0 14px; }
.post-lede { font-size: 18px; color: var(--gray); margin: 0 0 16px; }
.post-meta { font-size: 14px; color: var(--gray); display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
.toc-title { font-weight: 700; margin: 0 0 6px; font-size: 15px; }
.toc ul { margin: 0; padding-left: 18px; }
.toc a { color: var(--gray); font-size: 14.5px; }

/* Post body typography */
.post-body { font-size: 17.5px; }
.post-body h2 { font-size: 24px; margin: 40px 0 14px; letter-spacing: -.01em; border-top: 2px solid var(--navy); padding-top: 18px; }
.post-body h3 { font-size: 20px; margin: 28px 0 10px; }
.post-body p { margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin-bottom: 8px; }
.post-body strong { color: var(--navy); }
.post-body a { text-decoration: underline; text-underline-offset: 2px; }
.post-body blockquote { margin: 22px 0; padding: 12px 18px; background: var(--bg-soft); border-left: 4px solid var(--blue); border-radius: 0 8px 8px 0; color: var(--gray); }
.post-body blockquote p:last-child { margin: 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15.5px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post-body thead th { background: var(--navy); color: #fff; font-weight: 700; }
.post-body tbody tr:nth-child(even) { background: var(--bg-soft); }
.post-body code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.post-disclaimer { font-size: 13.5px; color: var(--gray); background: #fff8e6; border: 1px solid #f0e0b0; border-radius: var(--radius); padding: 14px 18px; margin: 30px 0; line-height: 1.6; }

/* 쿠팡 파트너스 */
.coupang-notice { font-size: 13px; color: #8a6d3b; background: #fcf3e3; border: 1px solid #f0dcb0; border-radius: 8px; padding: 10px 14px; margin: 18px 0; line-height: 1.6; }
.coupang-cta { margin: 18px 0; text-align: center; }
.coupang-banner { margin: 30px auto; text-align: center; max-width: 100%; overflow-x: auto; }
.coupang-banner iframe { max-width: 100%; }
.coupang-btn { display: inline-block; background: linear-gradient(135deg, #ff6f4d, #ff5023); color: #fff; font-weight: 700; font-size: 16px; padding: 14px 28px; border-radius: 10px; box-shadow: 0 4px 12px rgba(255,80,35,.25); transition: transform .12s, box-shadow .12s; }
.coupang-btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(255,80,35,.35); color: #fff; }
.post-tags { margin: 26px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 13px; color: var(--gray); background: var(--bg-soft); padding: 5px 12px; border-radius: 999px; }
.tag:hover { text-decoration: none; color: var(--navy); }
.related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.related h2 { font-size: 19px; margin: 0 0 12px; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin-bottom: 8px; }
.related a { font-weight: 600; }

/* Ads */
.ad-wrap { margin: 28px auto; text-align: center; min-height: 90px; }
.ad-placeholder { margin: 28px auto; max-width: 728px; min-height: 90px; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #f3f5f8, #f3f5f8 10px, #eef1f5 10px, #eef1f5 20px); border: 1px dashed #cfd6df; border-radius: 8px; color: #9aa3af; font-size: 13px; }

/* Single page static content (about, privacy...) */
.page-body { max-width: var(--readw); margin: 0 auto; }

/* Footer */
.site-footer { background: var(--navy); color: #c4cfde; margin-top: 60px; padding: 40px 0 28px; font-size: 14px; }
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand strong { color: #fff; font-size: 18px; display: block; margin-bottom: 8px; }
.footer-brand p { margin: 0; max-width: 420px; color: #9fb0c6; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { color: #c4cfde; font-weight: 600; }
.footer-disclaimer { margin: 20px 0 10px; color: #8a9bb3; font-size: 12.5px; line-height: 1.7; }
.copyright { margin: 0; color: #7888a0; font-size: 12.5px; }

/* 404 */
.notfound { text-align: center; padding: 90px 0; }
.notfound h1 { font-size: 72px; margin: 0; color: var(--navy); }
.notfound p { color: var(--gray); margin: 8px 0 24px; }

/* Responsive */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .site-nav { position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .site-nav.open { max-height: 360px; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 20px; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a { display: block; padding: 12px 0; }
  .hero { padding: 44px 0 30px; }
  .hero h1 { font-size: 26px; }
  .card-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .post-title { font-size: 25px; }
  .post-body { font-size: 16.5px; }
  .post-body h2 { font-size: 21px; }
}
