/* ===== 세금 계산기 공통 스타일 ===== */
:root {
  --navy: #14253d;
  --navy-2: #1f3a5f;
  --accent: #2563eb;
  --accent-2: #0ea5e9;
  --teal: #0d9488;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --good: #16a34a;
  --warn: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 8px 24px rgba(16,24,40,.06);
  --maxw: 880px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 헤더 ===== */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo:hover { text-decoration: none; }
.logo .dot { color: var(--accent-2); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav-links a.active { color: #fff; background: var(--navy-2); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--navy-2);
    flex-direction: column;
    padding: 8px;
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
}

/* ===== 레이아웃 ===== */
main { max-width: var(--maxw); margin: 0 auto; padding: 28px 18px 60px; }
.wide { max-width: 1080px; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }

h1 { font-size: 1.85rem; line-height: 1.3; margin: 6px 0 10px; letter-spacing: -.6px; }
h2 { font-size: 1.35rem; margin: 36px 0 12px; letter-spacing: -.4px; }
h3 { font-size: 1.1rem; margin: 24px 0 8px; }
p { margin: 10px 0; }
.lead { font-size: 1.08rem; color: var(--muted); }

/* ===== 히어로 ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 56px 18px 60px;
  text-align: center;
}
.hero h1 { font-size: 2.3rem; margin: 0 0 14px; color: #fff; }
.hero p { font-size: 1.12rem; color: #c7d2e0; max-width: 620px; margin: 0 auto; }
.hero .badge {
  display: inline-block;
  background: rgba(14,165,233,.18);
  border: 1px solid rgba(14,165,233,.4);
  color: #7dd3fc;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ===== 카드 그리드 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.calc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  display: block;
  color: inherit;
}
.calc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(16,24,40,.12);
  text-decoration: none;
}
.calc-card .ico { font-size: 1.8rem; }
.calc-card h3 { margin: 10px 0 6px; color: var(--navy); }
.calc-card p { font-size: .92rem; color: var(--muted); margin: 0; }
.calc-card .go { color: var(--accent); font-weight: 600; font-size: .9rem; margin-top: 12px; display: inline-block; }

/* ===== 계산기 폼 ===== */
.calc-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin: 20px 0;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: .95rem; }
.field .hint { font-size: .82rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.field input[type=number], .field input[type=text], .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  transition: border .15s, box-shadow .15s;
  -moz-appearance: textfield;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.input-won { position: relative; }
.input-won input { padding-right: 42px; }
.input-won::after {
  content: "원";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .9rem;
  pointer-events: none;
}
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-group label {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  margin: 0;
  transition: all .15s;
}
.radio-group input { display: none; }
.radio-group input:checked + span { }
.radio-group label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(37,99,235,.08);
  color: var(--accent);
  font-weight: 700;
}
.btn-calc {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-calc:hover { background: #1d4ed8; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== 결과 ===== */
.result {
  margin-top: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: none;
}
.result.show { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-head {
  background: linear-gradient(135deg, var(--teal), #0891b2);
  color: #fff;
  padding: 22px 24px;
  text-align: center;
}
.result-head .label { font-size: .92rem; opacity: .9; }
.result-head .total { font-size: 2.1rem; font-weight: 800; margin-top: 4px; letter-spacing: -1px; }
.result-body { background: #fff; padding: 8px 24px 20px; }
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: .96rem;
}
.result-row:last-child { border-bottom: 0; }
.result-row .k { color: var(--muted); }
.result-row .v { font-weight: 600; }
.result-row.sum { font-weight: 800; font-size: 1.05rem; }
.result-row.sum .v { color: var(--warn); }

/* ===== 안내 박스 ===== */
.notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 20px 0;
  font-size: .92rem;
}
.notice.warn { background: #fef2f2; border-color: #fecaca; border-left-color: var(--warn); }
.notice.update { background: #f0fdf4; border-color: #bbf7d0; border-left-color: var(--good); }
.notice strong { display: block; margin-bottom: 4px; }

/* ===== 표 ===== */
.tax-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .92rem; }
.tax-table th, .tax-table td { padding: 11px 12px; border: 1px solid var(--line); text-align: center; }
.tax-table th { background: var(--navy); color: #fff; font-weight: 600; }
.tax-table tr:nth-child(even) td { background: #f8fafc; }
.tax-table .num { text-align: right; }

/* ===== 가이드/FAQ ===== */
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.article p, .article li { font-size: 1rem; }
.faq { margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.faq summary { padding: 16px 18px; font-weight: 600; cursor: pointer; background: #f8fafc; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q. "; color: var(--accent); font-weight: 800; }
.faq[open] summary { border-bottom: 1px solid var(--line); }
.faq .ans { padding: 16px 18px; color: var(--text); }

/* ===== 광고 슬롯 ===== */
.ad-slot {
  margin: 28px auto;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 푸터 ===== */
.site-footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 36px 18px;
  font-size: .88rem;
  margin-top: 40px;
}
.footer-inner { max-width: 1080px; margin: 0 auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.footer-links a { color: #cbd5e1; }
.footer-disclaimer { color: #64748b; font-size: .82rem; line-height: 1.6; }

/* ===== 유틸 ===== */
.related { margin-top: 30px; }
.related a { display: inline-block; margin: 4px 8px 4px 0; padding: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
.text-muted { color: var(--muted); }
.center { text-align: center; }

/* ===== 사용 방법 단계 ===== */
.step-list { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
.step-list li {
  position: relative;
  padding: 14px 16px 14px 56px;
  margin-bottom: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .96rem;
}
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px; top: 12px;
  width: 28px; height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .88rem;
}

/* ===== 절세 팁 박스 ===== */
.tip-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 18px 20px;
  margin: 18px 0;
}
.tip-box h3 { margin-top: 0; color: #92400e; }
.tip-box ul { margin: 8px 0 0; padding-left: 20px; }
.tip-box li { margin: 6px 0; }

/* ===== 출처 / 업데이트 ===== */
.source-line {
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 26px;
}
.updated-tag {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== 일정 타임라인 (홈) ===== */
.schedule { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.schedule .sched-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px;
}
.schedule .sched-item .month { font-weight: 800; color: var(--accent); font-size: 1.05rem; }
.schedule .sched-item .what { font-size: .9rem; color: var(--muted); margin-top: 4px; }
