:root {
  --paper: #faf8f4;
  --ink: #1b1a18;
  --ink-2: #3d3a35;
  --muted: #77726a;
  --rule: #e2ddd3;
  --rule-strong: #1b1a18;
  --accent: #8f2a1e;
  --box: #f3efe7;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --sans: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ---------- masthead ---------- */
.topbar { border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; }
.util { display: flex; gap: 16px; }
.brand { text-align: center; padding: 28px 16px 18px; }
.brand h1 { font-size: inherit; font-weight: inherit; }
.logo {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 48px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.logo span { font-size: 0.42em; font-weight: 700; margin-left: 6px; color: var(--accent); letter-spacing: 0; }
.logo:hover { text-decoration: none; }
.tagline { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.gnb { border-top: 3px double var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.gnb ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gnb ul::-webkit-scrollbar { display: none; }
.gnb a { display: block; padding: 12px 16px; font-weight: 600; white-space: nowrap; }
.gnb a[aria-current='page'] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); text-decoration: none; }

main { padding-top: 32px; padding-bottom: 64px; }

/* ---------- 공통 조각 ---------- */
.kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--c, var(--accent));
  margin-bottom: 6px;
}
.meta { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.sec-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--ink);
}

/* ---------- 홈: 리드 ---------- */
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.lead-thumb { display: block; margin-bottom: 16px; }
.lead-title { font-family: var(--serif); font-size: 32px; line-height: 1.3; letter-spacing: -0.02em; }
.deck { margin: 12px 0 0; font-size: 17px; color: var(--ink-2); }
.lead-side { border-left: 1px solid var(--rule); padding-left: 32px; }
.side-item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.side-item:first-child { padding-top: 0; }
.side-item:last-child { border-bottom: 0; }
.side-item h3 { font-family: var(--serif); font-size: 18px; line-height: 1.4; }

/* ---------- 2단 ---------- */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  padding-top: 32px;
}
.item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.item h3 { font-family: var(--serif); font-size: 20px; line-height: 1.4; }
.summary {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar { display: flex; flex-direction: column; gap: 32px; }
.box .sec-title { font-size: 17px; }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank li { counter-increment: r; display: grid; grid-template-columns: 28px 1fr; padding: 12px 0; border-bottom: 1px solid var(--rule); font-weight: 600; line-height: 1.45; }
.rank li::before { content: counter(r); font-family: var(--serif); font-weight: 900; font-size: 20px; color: var(--accent); line-height: 1.2; }
.cat-links, .plain { list-style: none; margin: 0; padding: 0; }
.cat-links a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--rule); font-weight: 600; }
.cat-links a::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); align-self: center; margin-right: 10px; }
.cat-links a span { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 14px; }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--rule); line-height: 1.45; }

/* ---------- 분야 블록 ---------- */
.cat-blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 3px double var(--ink);
}
.cat-block h2 { font-family: var(--serif); font-size: 18px; color: var(--c); padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.cat-block ul { list-style: none; margin: 0; padding: 0; }
.cat-block li { padding: 10px 0; border-bottom: 1px dotted var(--rule); line-height: 1.45; }

/* ---------- 기사 ---------- */
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; margin-bottom: 14px; }
.post-title { font-family: var(--serif); font-size: 36px; line-height: 1.32; letter-spacing: -0.02em; }
.post-deck {
  margin: 16px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  font-size: 17px;
  color: var(--ink-2);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
}
.post-meta a { color: var(--ink); font-weight: 700; }
.post-cover { margin: 28px 0; }
.post-cover figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.post-body { font-size: 18px; line-height: 1.85; }
.post-body p { margin: 0 0 1.3em; }
.post-body h2 { font-family: var(--serif); font-size: 23px; line-height: 1.4; margin: 2em 0 0.8em; }
.post-body h3 { font-size: 19px; margin: 1.6em 0 0.6em; }
.post-body ul, .post-body ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.post-body li { margin-bottom: 0.4em; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote { margin: 1.5em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--rule-strong); font-family: var(--serif); }
.editor-box {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding: 20px;
  background: var(--box);
  font-size: 15px;
}
.editor-box p { margin: 0; color: var(--ink-2); }
.editor-name { margin-bottom: 4px !important; font-weight: 700; color: var(--ink) !important; }
.editor-name span { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
.avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
}
.avatar.lg { width: 72px; height: 72px; font-size: 30px; }

.related { margin-top: 56px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 20px; }
.card-thumb { display: block; margin-bottom: 12px; }
.card h3 { font-family: var(--serif); font-size: 18px; line-height: 1.4; }

/* ---------- 목록/정적 페이지 ---------- */
.page-head { padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.page-head h1 { font-family: var(--serif); font-size: 32px; color: var(--c, var(--ink)); }
.page-head h1 span { font-family: var(--sans); font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head.profile { display: flex; gap: 20px; align-items: center; }
.page-head + .two-col { padding-top: 8px; }
.latest .sec-title + .item { padding-top: 20px; }
.empty { color: var(--muted); padding: 24px 0; }
.static { max-width: 720px; margin: 0 auto; font-size: 17px; line-height: 1.8; }
.static h1 { font-family: var(--serif); font-size: 32px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.static h2 { font-family: var(--serif); font-size: 20px; margin: 1.8em 0 0.6em; }
.static a { color: var(--accent); text-decoration: underline; }
.contact-mail { font-size: 20px; font-weight: 700; }

/* ---------- footer ---------- */
.footer { border-top: 3px double var(--ink); padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
.footer-brand { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--ink); }
.footer-brand p { font-family: var(--sans); font-weight: 400; font-size: 14px; color: var(--muted); margin: 6px 0 0; max-width: 560px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 12px; color: var(--ink-2); }
.copy { margin: 0; font-size: 13px; }

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .lead-grid { grid-template-columns: minmax(0, 1fr); }
  .lead-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 16px; }
  .cat-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .util { display: none; }
  .brand { padding: 20px 16px 14px; }
  .logo { font-size: 36px; }
  .gnb ul { justify-content: flex-start; }
  .gnb a { padding: 11px 12px; }
  main { padding-top: 20px; }
  .lead-title { font-size: 25px; }
  .post-title { font-size: 27px; }
  .post-body { font-size: 17px; }
  .item { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .item h3 { font-size: 17px; }
  .summary { display: none; }
  .cat-blocks, .cards { grid-template-columns: minmax(0, 1fr); }
}

.sponsored { display: inline-block; margin: 0 0 12px; padding: 2px 8px; border: 1px solid var(--rule); font-size: 12px; font-weight: 700; color: var(--muted); }
.empty-home { padding: 64px 0; text-align: center; }
