:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-alt: #eef2f6;
  --ink: #10212b;
  --ink-muted: #43555f;
  --ink-soft: #6b7d87;
  --border: #dde5ea;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --primary-soft: #e7f4f2;
  --accent: #ea580c;
  --accent-soft: #fff2e8;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(16, 33, 43, 0.06);
}

* { box-sizing: border-box; }

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 헤더 */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-badge {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0f766e, #0b2b3c);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}
.brand small {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}
.nav-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav-links a { color: var(--ink-muted); font-weight: 600; font-size: 0.9rem; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); text-decoration: none; }

/* 히어로 */
.hero {
  background: linear-gradient(135deg, #0b2b3c 0%, #0f4b52 55%, #0f766e 100%);
  color: #f4faf9;
  padding: 52px 0 44px;
}
.hero-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(190, 242, 233, 0.35);
  color: #d5f5ef;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.32;
  letter-spacing: -0.03em;
}
.hero p { margin: 0; max-width: 720px; color: #cfeeea; font-size: 1.02rem; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.hero-stats span {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #eafaf7;
}

/* 섹션·카드 */
.section { padding: 40px 0; }
.section-title { font-size: 1.4rem; margin: 0 0 8px; letter-spacing: -0.02em; }
.section-sub { margin: 0 0 24px; color: var(--ink-muted); }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tool-card:hover { transform: translateY(-2px); border-color: #7dd3c8; }
.tool-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tool-card h2, .tool-card h3 { margin: 0 0 8px; font-size: 1.12rem; line-height: 1.45; }
.tool-card p { margin: 0 0 18px; color: var(--ink-muted); font-size: 0.92rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }

/* 요약 박스 */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}
.summary-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 14px 16px;
}
.summary-box .s-label { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.summary-box .s-val { font-size: 1.18rem; font-weight: 800; margin: 2px 0; }
.summary-box .s-note { font-size: 0.82rem; color: var(--ink-muted); }

/* 계산기 레이아웃 */
.breadcrumb { padding: 16px 0 4px; font-size: 0.84rem; color: var(--ink-soft); }
.page-intro { padding: 8px 0 22px; }
.page-intro h1 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 1.35; letter-spacing: -0.025em; }
.page-intro p { margin: 0; color: var(--ink-muted); max-width: 780px; }
.meta-line { margin-top: 10px; font-size: 0.82rem; color: var(--ink-soft); }

.calc-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 880px) { .calc-workspace { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 16px; font-size: 1.06rem; }
.field { margin-bottom: 15px; }
.field label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field-hint { font-weight: 500; color: var(--ink-soft); font-size: 0.8rem; }
.field input[type="number"],
.field input[type="text"],
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
}
.field input[type="range"] { width: 100%; margin-top: 6px; accent-color: var(--primary); }
.field input:focus, .field select:focus { outline: 2px solid #7dd3c8; border-color: var(--primary); }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; margin-bottom: 10px; }
.check-row input { margin-top: 5px; accent-color: var(--primary); }

/* 결과 */
.result-highlight {
  background: linear-gradient(135deg, #e7f4f2, #f2fbf6);
  border: 1px solid #a7e0d6;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.result-label { font-size: 0.8rem; font-weight: 700; color: var(--ink-muted); letter-spacing: 0.02em; }
.result-value { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; color: var(--ink); line-height: 1.25; margin: 4px 0; }
.result-sub { font-size: 0.88rem; color: var(--ink-muted); }
.verdict {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.verdict-free { background: #dcfce7; color: #15803d; }
.verdict-tax { background: var(--accent-soft); color: #c2410c; }
.verdict-warn { background: #fef3c7; color: #92400e; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi-box { background: var(--surface-alt); border-radius: 10px; padding: 11px 13px; }
.kpi-box .k-label { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }
.kpi-box .k-val { font-size: 1.05rem; font-weight: 800; margin-top: 2px; }

.bar-wrap { margin-top: 12px; }
.bar-row { margin-bottom: 9px; }
.bar-meta { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.bar-track { height: 9px; background: var(--surface-alt); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.25s ease; }
.note-box {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

/* 본문 글 */
.article-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  margin-top: 26px;
  box-shadow: var(--shadow);
}
.article-box h2 { margin: 28px 0 10px; font-size: 1.26rem; letter-spacing: -0.015em; line-height: 1.45; }
.article-box h2:first-child { margin-top: 0; }
.article-box h3 { margin: 18px 0 6px; font-size: 1.02rem; }
.article-box p, .article-box li { color: var(--ink-muted); }
.article-box td, .article-box th { word-break: keep-all; }
.article-box table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}
.article-box th, .article-box td { border: 1px solid var(--border); padding: 9px 11px; text-align: left; vertical-align: top; }
.article-box th { background: var(--surface-alt); color: var(--ink); font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.callout {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 13px 15px;
  border-radius: 8px;
  margin: 16px 0;
  color: var(--ink);
  font-size: 0.94rem;
}
.callout-warn { background: var(--accent-soft); border-left-color: var(--accent); }
.faq-item { border-top: 1px solid var(--border); padding: 14px 0 4px; }
.faq-item h3 { margin: 0 0 6px; }
.source-list { font-size: 0.86rem; color: var(--ink-soft); }
.source-list li { margin-bottom: 4px; }

/* 푸터 */
.site-footer {
  margin-top: 48px;
  background: #10212b;
  color: #9fb2bd;
  padding: 32px 0;
  font-size: 0.88rem;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: #cfdae2; }
.footer-note { margin-top: 8px; font-size: 0.8rem; color: #7f939f; max-width: 560px; }
