/* ==========================================================================
   연봉 실수령액 계산기 — 디자인 시스템 (노션 · 모노톤 / 라운드 버튼 / Poppins / 라인 아이콘)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --primary: #2383E2;
  --primary-soft: rgba(35, 131, 226, 0.12);
  --text: #191919;
  --sub: #787774;
  --bg: #FFFFFF;
  --surface: #F7F6F3;
  --border: #E9E9E7;

  /* 막대그래프용 항목별 색상 (모노톤 + 포인트 블루 계열) */
  --chart-1: #2383E2; /* 국민연금 */
  --chart-2: #5B9FE0; /* 건강보험 */
  --chart-3: #8FBBE8; /* 장기요양보험 */
  --chart-4: #B8D4EF; /* 고용보험 */
  --chart-5: #191919; /* 소득세 */
  --chart-6: #787774; /* 지방소득세 */
  --chart-net: #F7F6F3; /* 실수령액 */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; margin: 0 0 8px; }

p { margin: 0 0 12px; }

a { color: var(--primary); }

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

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

/* ---------- 헤더 ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.site-header .brand .icon { color: var(--primary); }

/* ---------- 광고 슬롯 ---------- */
.ad-slot {
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--sub);
  text-align: center;
  padding: 18px;
  border-radius: 10px;
  font-size: 12px;
  margin: 24px 0;
}

/* ---------- 계산기 카드 ---------- */
.calculator-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 14px;
}
.section-title .icon { width: 18px; height: 18px; color: var(--primary); }

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group.full { grid-column: 1 / -1; }

.input-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sub);
}
.input-group label .icon { width: 15px; height: 15px; }

.input-group input[type="number"],
.input-group select {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  width: 100%;
  outline: none;
  transition: border-color .15s;
}
.input-group input[type="number"]:focus,
.input-group select:focus {
  border-color: var(--primary);
  background: var(--bg);
}
.input-hint { font-size: 11.5px; color: var(--sub); }

/* ---------- 결과 영역 ---------- */
.result-hero {
  text-align: center;
  background: var(--surface);
  border-radius: 14px;
  padding: 28px 16px;
  margin-top: 24px;
}
.result-hero .label {
  font-size: 13px;
  color: var(--sub);
  font-weight: 500;
  margin-bottom: 6px;
}
.result-hero .value {
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.result-hero .sub-value {
  margin-top: 10px;
  font-size: 14px;
  color: var(--sub);
}
.result-hero .sub-value strong { color: var(--text); font-weight: 600; }

/* 공제율 요약 칩 */
.rate-summary {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.rate-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--sub);
}
.rate-chip strong { color: var(--text); }

/* ---------- 막대그래프 ---------- */
.chart-wrap { margin-top: 24px; }
.bar-chart {
  display: flex;
  width: 100%;
  height: 26px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.bar-chart .seg { height: 100%; }

.chart-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin-top: 14px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--sub);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-item .amt { margin-left: auto; color: var(--text); font-weight: 500; }

/* ---------- 공제 내역 표 ---------- */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 13.5px;
}
.breakdown-table th, .breakdown-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.breakdown-table th { color: var(--sub); font-weight: 500; }
.breakdown-table td:last-child, .breakdown-table th:last-child { text-align: right; }
.breakdown-table tr:last-child td { border-bottom: none; font-weight: 700; }

/* ---------- 버튼 (라운드) ---------- */
.btn {
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  font-family: inherit;
  font-size: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { filter: brightness(.95); }
.btn:active { filter: brightness(.9); }
.btn.btn-block { width: 100%; justify-content: center; margin-top: 18px; }
.btn.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn .icon { width: 16px; height: 16px; color: inherit; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 안내 문구 ---------- */
.disclaimer {
  display: flex;
  gap: 10px;
  background: var(--surface);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.6;
}
.disclaimer .icon { width: 16px; height: 16px; color: var(--primary); margin-top: 1px; }

/* ---------- 콘텐츠 섹션 (SEO) ---------- */
.content-section { margin-top: 40px; }
.content-section h2 {
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.content-section h2 .icon { color: var(--primary); }
.content-section p, .content-section li {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.75;
}
.content-section ul { padding-left: 20px; margin: 0 0 12px; }
.content-block + .content-block { margin-top: 28px; }

.rate-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}
.rate-list li {
  display: flex;
  justify-content: space-between;
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
}
.rate-list li span:last-child { color: var(--sub); }

.salary-table-wrap { overflow-x: auto; margin-top: 12px; }
.salary-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 13px;
}
.salary-table th, .salary-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}
.salary-table th:first-child, .salary-table td:first-child { text-align: left; }
.salary-table th { color: var(--sub); font-weight: 500; background: var(--surface); }

.faq-item { margin-top: 16px; }
.faq-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.faq-item p { font-size: 14px; color: var(--sub); }

/* ---------- 푸터 ---------- */
.site-footer {
  margin-top: 48px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--sub);
  font-size: 12px;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
}
.footer-nav a {
  color: var(--sub);
  text-decoration: none;
  font-weight: 500;
}
.footer-nav a:hover { color: var(--primary); }

/* ---------- 정적 페이지 (소개/방침) ---------- */
.static-page { padding: 40px 0 60px; }
.static-page h1 { font-size: 24px; margin-bottom: 18px; }
.static-page h2 { font-size: 17px; margin-top: 28px; margin-bottom: 8px; }
.static-page p, .static-page li { font-size: 14.5px; color: var(--text); line-height: 1.8; }
.static-page ul { padding-left: 20px; }
.static-page .updated { color: var(--sub); font-size: 12.5px; margin-bottom: 24px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 20px;
}

/* ---------- 반응형 ---------- */
@media (max-width: 600px) {
  .input-grid { grid-template-columns: 1fr; }
  .chart-legend { grid-template-columns: 1fr; }
  .calculator-card { padding: 18px; }
}
