:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1b1f24;
  --muted: #667085;
  --line: #e4e7ec;
  --accent: #1f7a5a;
  --accent-soft: #e7f4ee;
  --minus: #c2410c;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.6; word-break: keep-all;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 18px; }

header.site { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
header.site .wrap { display: flex; align-items: center; gap: 18px; height: 58px; }
.logo { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
nav.main { display: flex; gap: 4px; overflow-x: auto; margin-left: auto; }
nav.main a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; white-space: nowrap; }
nav.main a.on, nav.main a:hover { color: var(--accent); background: var(--accent-soft); }

main { padding: 26px 0 40px; }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.5px; }
.lead { color: var(--muted); margin: 0 0 22px; }
h2 { font-size: 20px; margin: 34px 0 10px; letter-spacing: -0.3px; }
h3 { font-size: 16px; margin: 20px 0 6px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 13px; margin-top: 4px; min-height: 1em; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.input { position: relative; }
.input input, .input select {
  width: 100%; font: inherit; font-size: 17px; padding: 11px 44px 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text);
}
.input select { padding-right: 14px; }
.input input:focus, .input select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.input .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.check { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; font: inherit; font-size: 15px; padding: 10px 6px; border: 0; background: #fff; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; font-weight: 700; }

.result-head { background: var(--accent); color: #fff; border-radius: var(--radius) var(--radius) 0 0; padding: 22px; }
.result-head .label { opacity: 0.85; font-size: 14px; }
.result-head .big { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.25; }
.result-head .sub { opacity: 0.9; font-size: 14px; }
.result { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); margin-top: 16px; }
.result .body { padding: 8px 22px 18px; }

table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th, table.list td { padding: 10px 0; border-bottom: 1px solid var(--line); }
table.list th { text-align: left; font-weight: 500; color: var(--muted); }
table.list td { text-align: right; font-variant-numeric: tabular-nums; }
table.list tr:last-child th, table.list tr:last-child td { border-bottom: 0; }
table.list tr.total th, table.list tr.total td { font-weight: 700; color: var(--text); }
.minus { color: var(--minus); }

table.grid { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.grid th, table.grid td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.grid th { background: var(--bg); color: var(--muted); font-weight: 600; position: sticky; top: 0; }
table.grid td:first-child, table.grid th:first-child { text-align: center; }
table.grid tr.best td { background: var(--accent-soft); font-weight: 700; }
.scroll { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }

.notice { background: #fff8e6; border: 1px solid #f5dfa6; color: #7a5b00; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }

.ad { margin: 22px 0; min-height: 100px; border: 1px dashed var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #b0b6bf; font-size: 13px; }

.content p, .content li { color: #344054; }
.content table.list td { text-align: left; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tool { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool .ico { font-size: 28px; }
.tool strong { display: block; font-size: 17px; margin: 8px 0 4px; }
.tool span { color: var(--muted); font-size: 14px; }

.related { display: flex; flex-wrap: wrap; gap: 8px; }
.related a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; text-decoration: none; font-size: 14px; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }
footer.site a { color: var(--muted); margin-right: 14px; }
