@font-face {
  font-family: "Pretendard Variable";
  src: url("fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #16202e;
  --muted: #5d6b7f;
  --line: #e4e9f1;
  --line-strong: #cfd8e5;
  --brand: #1d4ed8;
  --brand-dark: #163ba8;
  --brand-weak: #eef3ff;
  --green: #0b7a53;
  --green-weak: #e9f7f1;
  --red: #b42318;
  --amber: #8a5a00;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 10px 28px rgba(16, 24, 40, .05);
  --num-track: .012em;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

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

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- head ---------- */
.site-head {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px;
}
.head-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-weight: 800; white-space: nowrap;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; color: var(--brand);
  display: grid; place-items: center; flex: 0 0 auto;
  filter: drop-shadow(0 2px 5px rgba(29, 78, 216, .22));
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-text {
  font-size: 22px; font-weight: 850; letter-spacing: -.02em; line-height: 1;
  color: #0c1727;
}

/* 두 계산기를 같은 레벨의 탭으로 */
.calc-switch {
  display: flex; gap: 3px; padding: 3px; background: #e9eef7; border-radius: 12px;
  flex: 0 0 auto;
}
.calc-tab {
  display: flex; align-items: center; padding: 7px 13px; border-radius: 9px;
  font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; color: #55637a;
  text-decoration: none; white-space: nowrap; transition: color .15s, background .15s;
}
.calc-tab:hover { color: var(--brand); background: rgba(255, 255, 255, .6); }
.calc-tab.is-active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }

.head-nav { display: flex; gap: 16px; }
.head-nav a { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.head-nav a:hover { color: var(--brand); }
.head-nav a[aria-current="page"] { color: var(--ink); }

/* 상단 우측 '소개' 링크 — 계산기 탭과 구분되는 보조 링크, 모바일에서도 유지 */
.head-right { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; min-width: 0; }
.head-about {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.4;
  color: #55637a; background: #fff; text-decoration: none; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.head-about:hover { color: var(--brand); border-color: rgba(29, 78, 216, .4); background: var(--brand-weak); }
.head-about.is-active,
.head-about[aria-current="page"] { color: var(--brand); border-color: rgba(29, 78, 216, .45); background: var(--brand-weak); }
@media (max-width: 900px) { .head-nav { display: none; } .head-right { gap: 0; } }

/* 모바일 목차 — 900px 이하에서 헤더 메뉴를 대신합니다 */
.mobile-toc { display: none; }
@media (max-width: 900px) {
  .mobile-toc {
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 9px 20px; position: sticky; top: 64px; z-index: 25;
    background: rgba(245, 247, 251, .96); backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line); scrollbar-width: none;
  }
  .mobile-toc::-webkit-scrollbar { display: none; }
  .mobile-toc a {
    flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 999px;
    background: #fff; color: #4a566b; font-size: 12.5px; font-weight: 700; text-decoration: none;
    white-space: nowrap;
  }
  .mobile-toc a:active { color: var(--brand); border-color: var(--brand); }
}
@media (max-width: 560px) {
  .head-inner { height: 58px; gap: 8px; }
  .head-left { gap: 8px; }
  .brand { gap: 7px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
  .brand-text { font-size: 19px; letter-spacing: -.02em; }
  .calc-tab { padding: 6px 9px; font-size: 12.5px; }
  .head-about { padding: 5px 10px; font-size: 12.5px; }
}
@media (max-width: 360px) {
  .head-inner { gap: 6px; }
  .head-left { gap: 6px; }
  .brand { gap: 5px; }
  .brand-mark { width: 26px; height: 26px; border-radius: 8px; }
  .brand-text { font-size: 18px; }
  .calc-tab { padding: 5px 6px; font-size: 12px; }
  .head-about { padding: 5px 8px; font-size: 12px; }
}

/* ---------- hero ---------- */
.hero { padding: 50px 20px 28px; }
@media (max-width: 640px) { .hero { padding: 28px 20px 20px; } }
section[id], #results { scroll-margin-top: 80px; }
.eyebrow {
  display: inline-block; margin: 0 0 10px; font-size: 13px; font-weight: 700;
  color: var(--brand); background: var(--brand-weak); padding: 5px 11px; border-radius: 999px;
}
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.25; letter-spacing: -.025em; margin: 0 0 16px; }
.h1-sub { color: var(--brand); }
.lede { max-width: 720px; color: #3b4757; font-size: 16px; margin: 0 0 18px; }
@media (max-width: 640px) { .lede { font-size: 15px; } }
.lede strong { color: var(--ink); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.hero-badges li {
  font-size: 13px; font-weight: 600; color: #34405a; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

/* ---------- calculator layout ---------- */
.calc-wrap {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
  gap: 26px; align-items: start; padding-bottom: 44px;
}
.calc-main, .calc-side { min-width: 0; }
@media (max-width: 980px) {
  .calc-wrap { grid-template-columns: 1fr; }
  .calc-side { order: 2; }
}

.mode-tabs {
  display: inline-flex; background: #e9eef7; border-radius: 14px; padding: 4px; margin-bottom: 16px;
}
.mode-tab {
  border: 0; background: transparent; padding: 9px 19px; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 700; color: #5b6a80; cursor: pointer;
}
.mode-tab.is-active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }

.form { display: flex; flex-direction: column; gap: 18px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px; margin: 0; box-shadow: var(--shadow);
  min-width: 0;
}
.card-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; letter-spacing: -.005em; padding: 0; margin-bottom: 6px;
}
.step {
  width: 23px; height: 23px; border-radius: 8px; background: var(--brand-weak); color: var(--brand);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.card-help { color: var(--muted); font-size: 13px; margin: 6px 0 14px; line-height: 1.65; }
.hint { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; line-height: 1.65; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
body.single-mode .pair-grid { grid-template-columns: 1fr; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* 1인·외벌이: 배우자·부양가족 카드 사용액(합산 공제) 구역 */
.dependent-card {
  margin-top: 16px; padding: 14px 15px 12px;
  background: #f8fafd; border: 1px dashed var(--line-strong); border-radius: 14px;
}
.dependent-card .sub-head h3 { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.tag-sum {
  font-size: 10.5px; font-weight: 700; color: var(--brand); background: var(--brand-weak);
  border-radius: 999px; padding: 2px 8px; letter-spacing: 0;
}
.dependent-card .card-help { margin: 5px 0 12px; }
.dependent-card .grid-3 { gap: 10px; }
.dependent-card .hint { margin-top: 10px; }

.person-col { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.person-name {
  font-size: 13px; font-weight: 700; color: var(--brand); margin: 0 0 3px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.field { display: block; min-width: 0; }
.field-label { display: block; font-size: 12.5px; font-weight: 600; color: #44506a; margin-bottom: 6px; line-height: 1.5; }
.field-label em { font-style: normal; font-weight: 500; color: #8a94a6; }

.input-wrap {
  display: flex; align-items: stretch; background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.input-wrap input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 12px;
  font: inherit; font-size: 15px; font-weight: 500; letter-spacing: var(--num-track); text-align: right;
  font-variant-numeric: tabular-nums; color: var(--ink); outline: none;
}
.input-wrap .unit {
  display: flex; align-items: center; padding: 0 11px; font-size: 12px; font-weight: 600;
  color: #6b778c; background: #f4f6fa; border-left: 1px solid var(--line);
}

/* 셀렉트 박스가 들어간 입력 칸 */
.field select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; padding: 11px 12px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink); outline: none;
}
.field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }

.children { display: flex; flex-direction: column; gap: 10px; }
.child-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto auto; gap: 10px; align-items: end;
  background: #f8fafd; border: 1px solid var(--line); border-radius: 14px; padding: 11px;
}
.child-row .field-label { font-size: 11.5px; }
.child-dis {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: #44506a; padding-bottom: 12px;
}
.child-dis input { width: 16px; height: 16px; accent-color: var(--brand); }
@media (max-width: 520px) {
  .child-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .child-row .child-dis { grid-row: 2; grid-column: 1 / 3; padding-bottom: 0; }
  .child-row .btn-remove { grid-row: 2; grid-column: 3; }
}
.child-row select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
  padding: 10px 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
}
.btn-mini {
  border: 1px solid var(--line-strong); background: #fff; color: #33415c; border-radius: 9px;
  padding: 6px 11px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.btn-mini:hover { border-color: var(--brand); color: var(--brand); }
.btn-remove {
  border: 1px solid var(--line-strong); background: #fff; color: #7a4a4a; border-radius: 9px;
  width: 36px; height: 42px; font-size: 16px; cursor: pointer; line-height: 1;
}
.btn-remove:hover { border-color: #d9a5a5; background: #fff6f6; }
.sub-block { margin-top: 14px; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sub-block h3 { font-size: 14px; font-weight: 700; margin: 0 0 3px; }

.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #3c4a60; margin-top: 9px; line-height: 1.55; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand); }
.muted { color: var(--muted); }

.form-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 20px; box-shadow: var(--shadow);
}
.form-foot .check { margin-top: 0; }
.form-buttons { display: flex; gap: 8px; margin-left: auto; }
.btn-ghost {
  border: 1px solid var(--line-strong); background: #fff; color: #33415c; border-radius: var(--radius-sm);
  padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- results ---------- */
.calc-side { position: sticky; top: 80px; }
@media (max-width: 980px) { .calc-side { position: static; } }

.result-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px; box-shadow: var(--shadow);
}
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.result-head h2 { font-size: 15px; margin: 0; font-weight: 700; }
.result-head .stamp { font-size: 11.5px; color: var(--muted); }
.result-big {
  margin: 12px 0 4px; font-size: 33px; font-weight: 600; letter-spacing: var(--num-track);
  line-height: 1.22; font-variant-numeric: tabular-nums;
}
.result-big.pos { color: var(--green); }
.result-big.neg { color: var(--red); }
.result-sub { color: var(--muted); font-size: 13px; margin: 0 0 4px; line-height: 1.6; }
.result-note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.6; }

.scenario-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.scenario {
  border: 1px solid var(--line); border-radius: 16px; padding: 15px 16px 14px; background: #fbfcfe;
}
.scenario.is-best { border-color: #b9c9f5; background: linear-gradient(180deg, #f4f7ff, #fff); box-shadow: 0 0 0 3px rgba(29, 78, 216, .06); }
.scenario-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scenario-name { font-size: 13.5px; font-weight: 600; color: #2c3852; letter-spacing: -.002em; }
.badge-best {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--brand);
  border-radius: 999px; padding: 4px 10px;
}
.scenario-value {
  font-size: 23px; font-weight: 600; letter-spacing: var(--num-track);
  margin: 8px 0 5px; font-variant-numeric: tabular-nums; line-height: 1.25;
}
.scenario-value.pos { color: var(--green); }
.scenario-value.neg { color: var(--red); }
.scenario-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 5px 12px; }
.scenario-meta b { color: #3b4757; font-weight: 600; font-variant-numeric: tabular-nums; }

.diff-banner {
  margin-top: 14px; background: var(--green-weak); border: 1px solid #c7e9da;
  border-radius: 14px; padding: 13px 16px; font-size: 13.5px; color: #145c40; font-weight: 600;
  line-height: 1.6;
}
.diff-banner.zero { background: #f4f6fa; border-color: var(--line); color: #4b5871; font-weight: 500; }

.plan { margin-top: 16px; }
.plan h3 { font-size: 13px; margin: 0 0 9px; font-weight: 700; color: #2c3852; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan li { font-size: 12.8px; color: #3c4a60; padding-left: 16px; position: relative; line-height: 1.6; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px;
  border-radius: 2px; background: var(--brand);
}

details.person-detail {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden;
}
details.person-detail > summary {
  cursor: pointer; padding: 12px 15px; font-size: 13px; font-weight: 700; color: #2c3852;
  list-style: none; display: flex; justify-content: space-between; gap: 8px;
}
details.person-detail > summary::-webkit-details-marker { display: none; }
details.person-detail > summary::after { content: "▾"; color: #7b8798; }
details.person-detail[open] > summary::after { content: "▴"; }
.breakdown { padding: 2px 16px 14px; }
.bk-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #f0f3f8; font-size: 12.8px; line-height: 1.55;
}
.bk-row:last-child { border-bottom: 0; }
.bk-label { color: #2c3852; font-weight: 500; min-width: 0; }
.bk-label .sub { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; margin-top: 3px; }
.bk-value { font-weight: 600; letter-spacing: var(--num-track); font-variant-numeric: tabular-nums; white-space: nowrap; flex: 0 0 auto; }
.bk-row.sum { border-top: 1px solid var(--line-strong); border-bottom: 0; margin-top: 4px; padding-top: 11px; font-weight: 700; }
.bk-row.sum .bk-value { color: var(--green); }
.bk-row.sum .bk-value.neg { color: var(--red); }

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

/* ---------- 단위 가드 경고 ---------- */
.field-warn {
  display: block; margin: 6px 0 0; padding: 7px 10px; border-radius: 9px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  font-size: 11.5px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere;
}
.field-warn[hidden] { display: none; }
.warn-btn {
  display: inline-block; margin: 5px 0 0; padding: 3px 8px; border-radius: 7px;
  border: 1px solid #f0c674; background: #fff; color: #8a5a00;
  font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.warn-btn:hover { background: #fff7e6; }

/* ---------- 결과 카드 도구·상태 ---------- */
.result-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 2px;
}
.result-tools .demo-text { font-size: 11.5px; color: var(--muted); flex: 1 1 160px; line-height: 1.5; }
.demo-badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: -.005em;
  color: #1d4ed8; background: #eff5ff; border: 1px solid #cddcfb; border-radius: 999px; padding: 3px 9px;
}
.btn-tool {
  border: 1px solid var(--line-strong); background: #fff; color: #33415c; border-radius: 9px;
  padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.btn-tool:hover { border-color: var(--brand); color: var(--brand); }
.btn-tool.is-primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.btn-tool.is-primary:hover { background: #1740b8; color: #fff; }

.info-chip {
  margin: 12px 0 0; padding: 9px 12px; border-radius: 10px;
  background: #f8fafd; border: 1px dashed var(--line-strong);
  font-size: 12px; color: #4b5871; line-height: 1.6;
}
.empty-state { margin: 18px 0 4px; padding: 22px 18px; text-align: center; background: #f9fbff; border: 1px dashed var(--line-strong); border-radius: 14px; }
.empty-state strong { display: block; font-size: 15px; color: #263349; margin-bottom: 6px; }
.empty-state p { margin: 0; font-size: 12.8px; color: var(--muted); line-height: 1.65; }

/* ---------- prose ---------- */
.prose { max-width: 900px; padding-top: 36px; padding-bottom: 12px; }
.prose h2 {
  font-size: clamp(21px, 2.6vw, 27px); letter-spacing: -.015em; line-height: 1.4;
  margin: 0 0 16px; padding-top: 8px;
}
.prose h3 { font-size: 17px; margin: 28px 0 9px; letter-spacing: -.005em; }
.prose p { color: #35435a; margin: 0 0 13px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: normal; background: #f1f4fa; padding: 1px 5px; border-radius: 5px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin: 16px 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 560px; }
caption { text-align: left; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.6; }
thead th { background: #f7f9fd; font-size: 13px; color: #43506a; font-weight: 600; }
tbody th { font-weight: 600; color: #2c3852; width: 30%; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.note {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 0 14px 14px 0; padding: 16px 20px; margin: 10px 0 20px;
}
.note h3 { margin: 0 0 6px; font-size: 15px; }
.note p { margin: 0; font-size: 14px; }

ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0 6px; display: flex; flex-direction: column; gap: 12px; }
ol.steps li {
  counter-increment: s; position: relative; padding: 14px 18px 14px 50px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; font-size: 14.5px; color: #35435a;
}
ol.steps li::before {
  content: counter(s); position: absolute; left: 15px; top: 13px; width: 24px; height: 24px;
  border-radius: 8px; background: var(--brand-weak); color: var(--brand);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 18px;
}
.faq summary {
  cursor: pointer; padding: 15px 0; font-size: 14.5px; font-weight: 600; color: #263349;
  list-style: none; display: flex; justify-content: space-between; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 600; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; font-size: 14px; color: #3d4a60; }

.checklist { margin: 10px 0 6px; padding-left: 20px; }
.checklist li { margin-bottom: 9px; font-size: 14.5px; color: #35435a; }

.disclaimer { padding-top: 28px; }
.disclaimer h2 { font-size: 20px; }
.sources ul { padding-left: 20px; font-size: 13.5px; color: #46536b; }
.sources li { margin-bottom: 6px; }
.sources a { color: var(--brand); text-decoration: none; }
.sources a:hover { text-decoration: underline; }

.site-foot {
  margin-top: 40px; border-top: 1px solid var(--line); background: #fff; padding: 22px 0 28px;
}
.site-foot p { margin: 0 0 4px; font-size: 13px; color: #4a566d; }
.site-foot .muted { font-size: 12px; }

/* ---------- mini bar ---------- */
.mini-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border-top: 1px solid var(--line); padding: 10px 16px;
  box-shadow: 0 -6px 18px rgba(16, 24, 40, .08);
}
.mini-text { display: flex; flex-direction: column; line-height: 1.35; }
.mini-text span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mini-text strong { font-size: 16px; font-weight: 600; letter-spacing: var(--num-track); font-variant-numeric: tabular-nums; }
.mini-btn {
  border: 0; background: var(--brand); color: #fff; border-radius: var(--radius-sm); padding: 10px 16px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
@media (max-width: 980px) {
  .mini-bar { display: flex; }
  body { padding-bottom: 64px; }
}


@media (max-width: 640px) {
  .table-wrap { overflow-x: visible; }
  .table-wrap table { min-width: 0; font-size: 13.5px; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table-wrap tbody tr:last-child { border-bottom: 0; }
  .table-wrap th, .table-wrap td { display: block; width: auto; border: 0; padding: 0; }
  .table-wrap tbody th { font-size: 13.5px; color: #263349; margin-bottom: 6px; }
  .table-wrap td { color: #35435a; margin-top: 7px; overflow-wrap: break-word; }
  .table-wrap td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: 11px; font-weight: 600; color: #8a94a6; letter-spacing: .01em;
  }
}

/* ---------- footer ---------- */
.site-foot .foot-note { font-size: 12.5px; color: #4a566d; margin: 0 0 6px; }
.site-foot .foot-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  margin: 0; font-size: 12px; color: #7b8798;
}
.site-head a:focus-visible, .site-foot a:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px;
}
.site-foot a { color: var(--brand); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* ---------- about page ---------- */
.about-facts {
  list-style: none; padding: 0; margin: 20px 0 4px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.about-facts li {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.about-facts strong { font-size: 15px; letter-spacing: -.01em; }
.about-facts span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) { .about-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .about-facts { gap: 8px; } .about-facts li { padding: 12px 13px; } }

.tool-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 8px;
}
@media (max-width: 760px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tool-card:hover { border-color: #bcc9de; transform: translateY(-2px); }
.tool-card .tool-tag {
  align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: -.005em;
  color: var(--brand); background: var(--brand-weak); padding: 4px 9px; border-radius: 999px;
}
.prose .tool-card h3 { margin: 4px 0 2px; font-size: 18px; letter-spacing: -.02em; }
.tool-card p { font-size: 13.8px; color: #43506a; margin: 0; line-height: 1.62; }
.tool-card .tool-go { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--brand); }
.tool-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- policy page ---------- */
.policy-head { padding-top: 44px; padding-bottom: 4px; }
.policy-head h1 { margin-bottom: 12px; }
.policy-head .lede { margin-bottom: 0; }
@media (max-width: 640px) { .policy-head { padding-top: 28px; } }

@media print {
  .site-head, .mini-bar, .form, .mode-tabs, .hero-badges { display: none !important; }
  body { background: #fff; }
  .calc-wrap { display: block; }
}

/* ---------- 건보료·피부양자 계산기 ---------- */
.example-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  padding: 12px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 12px;
}
.example-label { font-size: 12.5px; font-weight: 800; color: #55637a; margin-right: 2px; }
.example-row .btn-mini { font-size: 12px; }

.hc-judge { font-size: 38px; font-weight: 850; letter-spacing: -.03em; line-height: 1.15; margin: 8px 0 2px; }
.hc-judge.keep { color: var(--green); }
.hc-judge.lose { color: var(--red); }
.hc-judge.border { color: var(--amber); }

.hc-reasons {
  margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px;
  background: #fdf2f1; border: 1px solid #f6d3cf;
}
.hc-reasons strong { display: block; font-size: 13px; color: #8f2a20; margin-bottom: 5px; }
.hc-reasons ul { margin: 0; padding-left: 18px; }
.hc-reasons li { font-size: 13.5px; line-height: 1.55; color: #5c3b36; }
.hc-reasons.ok { background: var(--green-weak); border-color: #c4e8d8; }
.hc-reasons.ok strong, .hc-reasons.ok p { color: #14624a; }
.hc-reasons.ok p { margin: 0; font-size: 13.5px; }
.hc-reasons.border { background: #fdf7e8; border-color: #f0dfae; }
.hc-reasons.border strong, .hc-reasons.border li { color: #7a5400; }

.hc-block { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.hc-block h3 { font-size: 14px; margin: 0 0 4px; letter-spacing: -.01em; }
.hc-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 2px; border-bottom: 1px solid #eef1f6; font-size: 13.8px; color: #33415c;
}
.hc-line > span { min-width: 0; }
.hc-line .sub { display: block; font-size: 11.5px; color: #7d889c; font-weight: 500; margin-top: 1px; }
.hc-line b { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.hc-line.total {
  margin-top: 8px; padding: 11px; border: 0; border-radius: 10px;
  background: var(--brand-weak); font-weight: 800; font-size: 15px;
}
.hc-line.total b { color: var(--brand-dark); font-size: 17px; }

.hc-now {
  margin-top: 14px; padding: 14px; border-radius: 12px;
  background: #f4f8ff; border: 1px solid #d8e4fb;
}
.hc-now strong { font-size: 15px; color: var(--brand-dark); }
.hc-now p { margin: 4px 0 0; font-size: 13.5px; color: #34456a; }
.hc-reverse { margin: 6px 0; font-size: 13.5px; line-height: 1.55; color: #33415c; }
.hc-data {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: #f6f8fc; border: 1px dashed var(--line-strong);
  font-size: 12.5px; color: #55637a;
}
.prose .tool-card strong { font-size: 17px; letter-spacing: -.02em; }
.prose .tool-card span { font-size: 13.8px; color: #43506a; }

/* 모바일 계산기 탭 라벨 축약 */
.tab-short { display: none; }
@media (max-width: 560px) {
  .tab-full { display: none; }
  .tab-short { display: inline; }
  .mobile-toc { top: 58px; }
  section[id], #results { scroll-margin-top: 112px; }
}
