/* 퇴사·월급 노트 — 2026 실수령액·퇴직금·실업급여 계산기 */
:root {
  --ink: #0b1b33;
  --ink-2: #2b3a4f;
  --muted: #64748b;
  --muted-2: #8b9aad;
  --line: #e6ebf2;
  --line-strong: #d3dbe6;
  --bg: #f5f7fb;
  --card: #ffffff;
  --brand: #0f766e;
  --brand-strong: #0b5f59;
  --brand-soft: #e6f7f4;
  --mint: #12b886;
  --accent: #2563eb;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --danger: #b42318;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 27, 51, .04), 0 8px 24px rgba(11, 27, 51, .06);
  --shadow-lg: 0 2px 4px rgba(11, 27, 51, .05), 0 16px 40px rgba(11, 27, 51, .10);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
section[id], div[id="calc"] { scroll-margin-top: 76px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

/* ── 헤더 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--mint));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}
.site-nav a {
  color: var(--ink-2);
  padding: 7px 11px;
  border-radius: 8px;
}
.site-nav a:hover { background: var(--brand-soft); color: var(--brand-strong); text-decoration: none; }

/* ── 히어로 ── */
.hero {
  padding: 44px 0 26px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.6vw, 38px);
  line-height: 1.28;
  letter-spacing: -.03em;
  font-weight: 800;
}
.hero p.lead {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 16px;
  max-width: 62ch;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(11, 27, 51, .03);
}
.facts b { color: var(--brand-strong); font-weight: 800; }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  flex: none;
}

/* ── 계산기 카드 ── */
.calc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 12px 16px 14px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color .15s ease, background .15s ease;
}
.tab .num {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}
.tab:hover { color: var(--ink-2); background: #f2f5f9; }
.tab.is-active { color: var(--brand-strong); background: #fff; }
.tab.is-active .num { background: var(--brand); color: #fff; }
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.panel { padding: 24px; }
.panel[hidden] { display: none; }

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* ── 입력 ── */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > label,
.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field .hint {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 500;
}
.input-unit {
  position: relative;
  display: flex;
  align-items: center;
}
.input-unit input,
.field input[type="number"],
.field input[type="date"],
.field select {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  font-variant-numeric: tabular-nums;
}
.field input[type="date"],
.field select { padding: 0 12px; }
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .13);
}
.input-unit .unit {
  position: absolute;
  right: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted-2);
  pointer-events: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand-strong); }
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }

.seg {
  display: inline-flex;
  padding: 3px;
  background: #eef2f7;
  border-radius: 10px;
  gap: 2px;
}
.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.seg-btn.is-active {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 1px 3px rgba(11, 27, 51, .12);
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ── 결과 ── */
.result-card {
  background: linear-gradient(180deg, #0b1b33, #12263f);
  color: #fff;
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.result-card::after {
  content: "";
  position: absolute;
  top: -60px; right: -50px;
  width: 190px; height: 190px;
  background: radial-gradient(circle, rgba(18, 184, 134, .38), transparent 68%);
  pointer-events: none;
}
.result-label {
  font-size: 13px;
  font-weight: 600;
  color: #9fb3cc;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-main {
  font-size: clamp(28px, 5.8vw, 38px);
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.result-sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: #b8c7d9;
  font-variant-numeric: tabular-nums;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.result-grid > div { min-width: 0; }
.result-grid .k {
  font-size: 11.5px;
  color: #9fb3cc;
  margin: 0 0 2px;
  font-weight: 600;
  white-space: nowrap;
}
.result-grid .v {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}
.badge--max { background: rgba(18, 184, 134, .9); }
.badge--min { background: rgba(245, 158, 11, .95); }

.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--warn-soft);
  border: 1px solid #fed7aa;
  color: var(--warn);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.notice[hidden] { display: none; }

/* ── 표 ── */
.breakdown {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.breakdown h3 {
  margin: 0;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  letter-spacing: -.01em;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
table.data th,
table.data td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
table.data th {
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}
table.data td:last-child,
table.data th:last-child { text-align: right; }
table.data tr:last-child th,
table.data tr:last-child td { border-bottom: 0; }
table.data tr.total th,
table.data tr.total td {
  background: #fafbfd;
  font-weight: 800;
  color: var(--ink);
  border-top: 1px solid var(--line-strong);
}
table.data td.neg { color: var(--danger); }
table.data td strong { font-weight: 800; }

details.calc-steps {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
details.calc-steps > summary {
  cursor: pointer;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
details.calc-steps > summary::-webkit-details-marker { display: none; }
details.calc-steps > summary::before {
  content: "＋";
  color: var(--brand);
  font-weight: 800;
}
details.calc-steps[open] > summary::before { content: "－"; }
details.calc-steps > summary:hover { background: #fafbfd; }
details.calc-steps .inner { padding: 0 0 6px; }
details.calc-steps table.data th { padding-left: 16px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn {
  appearance: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s ease;
}
.btn:hover { border-color: var(--brand); color: var(--brand-strong); }
.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn--primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }

/** 퇴사 정산 탭의 요약 카드 아래 안내 */
.tip-box {
  margin-top: 16px;
  padding: 15px 18px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
}
.tip-box h4 {
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.tip-box ul { margin: 0; padding-left: 17px; }
.tip-box li { margin-bottom: 3px; }
.tip-box li:last-child { margin-bottom: 0; }
.tip-box b { color: var(--brand-strong); font-weight: 800; }

/* ── 요약 카드 ── */
.summary-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0fbf8, #ffffff 60%);
  border: 1px solid #cdeee4;
}
.summary-title {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.summary-title span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.summary-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 28px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #d8ece6;
}
.summary-list dt { color: var(--ink-2); font-weight: 600; }
.summary-list dd { margin: 0; font-weight: 800; color: var(--ink); }
.summary-list .summary-total {
  grid-column: 1 / -1;
  border-bottom: 0;
  border-top: 1px solid #cdeee4;
  padding-top: 10px;
  margin-top: 2px;
}
.summary-list .summary-total dt { color: var(--brand-strong); font-weight: 800; }
.summary-list .summary-total dd { color: var(--brand-strong); font-size: 15px; }
.summary-card--wide { margin-top: 20px; }

.note-small {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.reco {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  background: #f1f5f9;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.reco strong { color: var(--ink); }
.reco--good { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.reco--warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ── 섹션 ── */
section.block { padding: 44px 0; }
section.block > .wrap > h2 {
  font-size: clamp(21px, 3vw, 26px);
  letter-spacing: -.025em;
  margin: 0 0 8px;
  font-weight: 800;
}
section.block > .wrap > p.sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14.5px;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.info-card h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.info-card .big {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
  margin: 2px 0 8px;
}
.info-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table-card h3 {
  margin: 0;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
}
table.rates {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
table.rates th,
table.rates td { padding: 11px 18px; border-bottom: 1px solid var(--line); text-align: right; }
table.rates th:first-child,
table.rates td:first-child { text-align: left; font-weight: 700; color: var(--ink-2); }
table.rates thead th {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
}
table.rates tbody tr:last-child td { border-bottom: 0; }
table.rates tbody tr:hover { background: #fafcfe; }
table.rates td.is-on {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
  border-radius: 6px;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }

/* ── FAQ ── */
.faq { display: grid; gap: 10px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(11, 27, 51, .03);
}
.faq summary {
  cursor: pointer;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "Q";
  flex: none;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  margin-top: 1px;
}
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .answer {
  padding: 14px 18px 18px 50px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.75;
}
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer strong { color: var(--ink); }

/* ── 출처/면책 ── */
.sources {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.sources h2 { margin: 0 0 10px; font-size: 16px; }
.sources ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.sources li { margin-bottom: 6px; }
.disclaimer {
  margin-top: 14px;
  padding: 16px 18px;
  background: #f0f4f9;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.disclaimer strong { color: var(--ink-2); }
.updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

/* ── 광고 슬롯 ── */
.ad-slot {
  display: none; /* 애드센스 승인 후 block으로 바꾸면 광고가 표시됩니다 */
  margin: 22px auto;
  min-height: 100px;
  max-width: 1080px;
  background: repeating-linear-gradient(45deg, #f7f9fc, #f7f9fc 10px, #f2f6fa 10px, #f2f6fa 20px);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

/* ── 푸터 ── */
.site-footer {
  margin-top: 30px;
  padding: 30px 0 46px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 14px; }

/* ── 반응형 ── */
@media (max-width: 860px) {
  .panel-grid { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .summary-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .hero { padding: 30px 0 20px; }
  .panel { padding: 18px 16px; }
  .tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    padding: 8px 8px 0;
    overflow: visible;
  }
  .tab {
    padding: 10px 4px 11px;
    font-size: 12.5px;
    justify-content: center;
    gap: 0;
    letter-spacing: -.02em;
  }
  .tab .num { display: none; }
  .tab.is-active::after { left: 6px; right: 6px; }
  .result-card { padding: 18px; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .row, .row-3 { grid-template-columns: 1fr; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .summary-list { grid-template-columns: 1fr; gap: 8px; }
  table.data th, table.data td { padding: 9px 12px; font-size: 13px; }
  section.block { padding: 32px 0; }
  .faq .answer { padding-left: 18px; }
  .facts li { font-size: 12.5px; padding: 5px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
