:root {
  --navy: #1b3a8c;
  --navy-d: #142b68;
  --red: #e2261c;
  --ink: #1f2430;
  --sub: #5b6374;
  --line: #e3e7ef;
  --bg: #ffffff;
  --soft: #f5f7fb;
  --w: 880px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.7; word-break: keep-all; overflow-wrap: break-word;
}
a { color: var(--navy); }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 16px; }

/* 헤더·메뉴 */
.hd { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.hd-in { max-width: 1200px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 24px; }
.logo img { display: block; height: 44px; width: auto; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 8px; color: var(--ink); cursor: pointer; }
.gnb { flex: 1; display: flex; align-items: center; justify-content: space-between; }
.gnb > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.gnb > ul > li { position: relative; }
.gnb > ul > li > a { display: block; padding: 20px 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.gnb > ul > li > a:hover, .gnb > ul > li > a.cur { color: var(--navy); }
.gnb > ul > li > a.cur { box-shadow: inset 0 -3px 0 var(--navy); }
.sub-toggle { display: none; }
.sub { list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: 0; min-width: 160px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 30, 60, .12); display: none; }
.sub a { display: block; padding: 8px 18px; color: var(--ink); text-decoration: none; font-size: 15px; white-space: nowrap; }
.sub a:hover { background: var(--soft); color: var(--navy); }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.hd-act { display: flex; align-items: center; gap: 8px; }
.kakao { display: inline-flex; align-items: center; gap: 6px; background: #fee500; color: #191919; text-decoration: none; padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.kakao:hover { background: #f5dc00; }
.order { background: var(--red); color: #fff; text-decoration: none; padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.order b { margin-left: 4px; }

@media (max-width: 860px) {
  .hd-in { height: 56px; gap: 8px; }
  .logo img { height: 38px; }
  .menu-btn { display: block; }
  .gnb { display: none; position: absolute; top: 56px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; max-height: calc(100vh - 56px); overflow-y: auto; padding: 8px 0 16px; }
  .hd.open .gnb { display: flex; }
  .gnb > ul { flex-direction: column; gap: 0; }
  .gnb > ul > li { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .gnb > ul > li > a { flex: 1; padding: 14px 16px; }
  .gnb > ul > li > a.cur { box-shadow: none; }
  .sub-toggle { display: block; width: 52px; background: none; border: 0; font-size: 22px; color: var(--sub); cursor: pointer; }
  .sub { position: static; display: none; width: 100%; box-shadow: none; border: 0; border-radius: 0; background: var(--soft);
    padding: 6px 0; columns: 2; }
  .has-sub:hover > .sub { display: none; }
  .has-sub.open > .sub { display: block; }
  .sub a { padding: 9px 24px; }
  .hd-act { flex-direction: column; align-items: stretch; margin: 14px 16px 0; }
  .kakao { justify-content: center; padding: 12px; }
  .order { text-align: center; padding: 12px; }
}

/* 홈 */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-d) 100%); color: #fff; padding: 48px 0 44px; }
.hero h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.3; }
.hero p { margin: 0; opacity: .9; font-size: 17px; }
.cats { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cats a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.cats a:hover { border-color: var(--navy); }
.cats strong { font-size: 18px; color: var(--navy); }
.cats span { font-size: 14px; color: var(--sub); line-height: 1.55; }
.cats em { font-style: normal; font-size: 13px; color: var(--red); font-weight: 600; margin-top: auto; }
.sec-t { margin: 40px 0 12px; font-size: 22px; }

/* 카드 목록 */
.cards { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 10px; }
.card a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.card a:hover { border-color: var(--navy); background: var(--soft); }
.card strong { display: block; font-size: 17px; line-height: 1.45; margin: 2px 0 6px; }
.card-cat { font-size: 13px; color: var(--red); font-weight: 600; }
.card-d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; color: var(--sub); line-height: 1.6; }

/* 허브 */
.hub h1 { font-size: 28px; margin: 6px 0 8px; }
.hub h2 { font-size: 21px; margin: 32px 0 10px; scroll-margin-top: 80px; }
.lead { color: var(--sub); margin: 0 0 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chips a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; }

/* 글 */
.bc { font-size: 14px; color: var(--sub); padding-top: 20px; }
.bc a { color: var(--sub); text-decoration: none; }
.post h1 { font-size: 27px; line-height: 1.4; margin: 10px 0 8px; letter-spacing: -0.01em; }
.meta { font-size: 14px; color: var(--sub); margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.post-body { margin-bottom: 40px; }
.post-body table { max-width: 100%; }
.post-body > div { max-width: 100% !important; }
.rel h2 { font-size: 20px; }

/* 하단 CTA·푸터 */
.cta { background: var(--soft); border-top: 1px solid var(--line); padding: 28px 0; }
.cta-t { margin: 0 0 12px; font-weight: 700; font-size: 18px; }
.cta-b { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-block; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; }
.btn.pri { background: var(--navy); border-color: var(--navy); color: #fff; }
.ft { background: #20242e; color: #b8bfcc; font-size: 13px; padding: 28px 0 40px; }
.ft p { margin: 2px 0; }
.ft a { color: #dde2ea; }
.ft-cat { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; font-size: 14px; }
.ft-cat a { text-decoration: none; }
.cp { margin-top: 10px !important; }

@media (max-width: 600px) {
  .hero { padding: 32px 0 30px; }
  .hero h1 { font-size: 25px; }
  .post h1 { font-size: 22px; }
  .hub h1 { font-size: 24px; }
  .post-body table { display: block; overflow-x: auto; }
}
