:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2421;
  --muted: #5f6762;
  --line: #e6e3dc;
  --brand: #2f7d5b;
  --brand-dark: #23634a;
  --brand-soft: #e8f3ed;
  --accent: #e8913a;
  --accent-soft: #fdf1e4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--brand); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; padding: 64px 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px; z-index: 10; }

/* 헤더 */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.logo { font-weight: 800; font-size: 19px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.logo-mark { font-size: 20px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 8px; }
.site-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 20px; padding: 2px 10px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--surface); flex-direction: column; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 8px; }
}

/* 히어로 */
.hero { background: linear-gradient(160deg, var(--brand-soft), var(--bg) 70%); padding: 56px 0 48px; }
.hero-eyebrow { color: var(--brand-dark); font-weight: 700; margin: 0 0 8px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.3; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero-sub { color: var(--muted); max-width: 560px; margin: 0 0 24px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--brand); color: #fff; text-decoration: none; padding: 12px 20px; border-radius: 10px; font-weight: 700; border: 0; cursor: pointer; font-size: 16px; font-family: inherit; }
.btn:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--surface); color: var(--brand-dark); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }

/* 섹션·카드 */
.home-section { margin: 40px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head h2, .page-title { font-size: 24px; margin: 0 0 16px; letter-spacing: -0.01em; }
.page-title { margin-top: 8px; }
.section-head a { font-size: 15px; text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.card h3 { font-size: 18px; line-height: 1.45; margin: 0; }
.card p { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.card-cat { display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.card-date { font-size: 13px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.tool-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.tool-card span:last-child { color: var(--muted); font-size: 14px; }
.tool-icon { font-size: 28px; }
.home-about { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 48px 0; }
.home-about h2 { margin-top: 0; font-size: 20px; }

/* 본문 */
.breadcrumb { font-size: 14px; color: var(--muted); margin: 20px 0 8px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-bottom: 32px; }
@media (max-width: 600px) { .article { padding: 20px 16px; border-radius: 10px; } }
.article-head h1 { font-size: clamp(24px, 4.2vw, 32px); line-height: 1.35; margin: 6px 0 12px; letter-spacing: -0.02em; }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 12px; }
.meta { font-size: 14px; color: var(--muted); margin: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.toc { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin: 24px 0; }
.toc-title { font-weight: 700; margin: 0 0 4px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc a { text-decoration: none; }
.prose h2 { font-size: 22px; margin: 40px 0 12px; padding-top: 8px; letter-spacing: -0.01em; scroll-margin-top: 80px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { font-size: 16.5px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.table-wrap { overflow-x: auto; margin: 16px 0; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--brand-soft); font-weight: 700; }
.prose td.num, .prose th.num { text-align: right; white-space: nowrap; }
.tip, .warn { border-radius: 10px; padding: 14px 18px; margin: 20px 0; font-size: 15.5px; }
.tip { background: var(--brand-soft); border-left: 4px solid var(--brand); }
.warn { background: var(--accent-soft); border-left: 4px solid var(--accent); }
.tip p, .warn p { margin: 4px 0; }
.h-sm { font-size: 18px; margin: 0 0 12px; }
.sources { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.notice { font-size: 14px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 14px 16px; margin-top: 24px; }
.author-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.author-avatar { font-size: 30px; background: var(--brand-soft); border-radius: 50%; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.author-name { font-weight: 700; margin: 0 0 2px; }
.author-box p.small { margin: 0; }
.related { margin-bottom: 48px; }

/* 계산기 */
.tool-page { max-width: 900px; margin-left: auto; margin-right: auto; }
.calc { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 20px 0; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.field .hint { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.field input, .field select { width: 100%; padding: 10px 12px; border: 1px solid #cfcac0; border-radius: 8px; font-size: 16px; font-family: inherit; background: #fff; color: var(--text); }
.field input:focus, .field select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 16px; margin: 8px 0 0; }
.check-list label { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; padding: 6px 4px; cursor: pointer; }
.check-list input { margin-top: 6px; accent-color: var(--brand); }
.check-list .price { color: var(--muted); font-size: 13px; display: block; }
.calc-group { font-weight: 800; margin: 18px 0 4px; font-size: 15px; color: var(--brand-dark); }
.result { background: var(--surface); border: 2px solid var(--brand); border-radius: 12px; padding: 20px; margin: 20px 0; }
.result-big { font-size: clamp(24px, 5vw, 32px); font-weight: 800; color: var(--brand-dark); margin: 4px 0; letter-spacing: -0.01em; }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15.5px; }
.result-row:last-child { border-bottom: 0; }
.result-row strong { white-space: nowrap; }
.pos { color: var(--brand-dark); }
.neg { color: #b4462b; }
.schedule-list { list-style: none; padding: 0; margin: 0; }
.schedule-list li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.schedule-list .date { font-weight: 800; min-width: 110px; color: var(--brand-dark); }
.schedule-list .past .date { color: var(--muted); text-decoration: line-through; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: #9a5a17; margin-left: 6px; font-weight: 700; }

/* 문의 폼 */
.form .field { margin-bottom: 14px; }
.form textarea { width: 100%; min-height: 140px; padding: 10px 12px; border: 1px solid #cfcac0; border-radius: 8px; font-size: 16px; font-family: inherit; }

/* 푸터 */
.site-footer { background: #1f2421; color: #d9ddd9; padding: 40px 0 24px; margin-top: 48px; }
.site-footer a { color: #d9ddd9; display: block; text-decoration: none; padding: 3px 0; font-size: 15px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .muted { color: #a9b0ab; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
.footer-logo { font-weight: 800; font-size: 18px; color: #fff; margin: 0 0 4px; }
.footer-h { font-weight: 700; color: #fff; margin: 0 0 6px; }
.copyright { font-size: 13px; color: #8f9792; border-top: 1px solid #3a403c; padding-top: 16px; margin-top: 24px; }
