:root {
  --bg: #f6f7f9; --card: #fff; --text: #16191d; --muted: #5d6673; --line: #e2e6eb;
  --accent: #0b6b58; --accent-soft: #e4f3ef; --warn: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111417; --card: #1a1e22; --text: #eceef0; --muted: #9aa3ad; --line: #2c3238;
    --accent: #4fc3a8; --accent-soft: #16302a; --warn: #ff8a80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Noto Sans KR", sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header.site { background: var(--card); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--text); letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
nav.top { overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--card); -webkit-overflow-scrolling: touch; }
nav.top .wrap { display: flex; gap: 4px; padding-top: 6px; padding-bottom: 6px; }
nav.top a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .92rem; }
nav.top a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
main { padding: 22px 0 40px; }
h1 { font-size: 1.55rem; line-height: 1.3; margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; margin: 30px 0 10px; letter-spacing: -0.01em; }
.lead { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 14px 0; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; padding: 11px 12px; text-align: right; outline: none; font-variant-numeric: tabular-nums; }
.input input[type=date] { text-align: left; }
.input .unit { padding-right: 12px; color: var(--muted); font-size: .95rem; }
select { width: 100%; font: inherit; font-size: 1rem; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.row > * { min-width: 0; }
.input input { width: 100%; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg label { flex: 1; margin: 0; text-align: center; font-weight: 500; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 4px; border-radius: 8px; font-size: .92rem; color: var(--muted); }
.seg input:checked + span { background: var(--card); color: var(--accent); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.result { border-color: var(--accent); }
.big { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.2; }
.big-label { color: var(--muted); font-size: .9rem; }
dl.rows { margin: 14px 0 0; }
dl.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
dl.rows dt { color: var(--muted); }
dl.rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
dl.rows .sum dt, dl.rows .sum dd { color: var(--text); font-weight: 800; }
.note { color: var(--muted); font-size: .85rem; margin-top: 12px; }
.warn { color: var(--warn); font-weight: 600; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--bg); font-weight: 700; color: var(--muted); position: sticky; top: 0; }
th:first-child, td:first-child { text-align: left; }
tr:last-child td { border-bottom: 0; }
tr.sum td { font-weight: 800; color: var(--text); }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumb a { color: var(--muted); }
.amounts { line-height: 2.1; }
.amounts a { display: inline-block; margin-right: 10px; white-space: nowrap; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; padding: 10px 0; cursor: pointer; text-decoration: underline; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 20px; }
details { border-top: 1px solid var(--line); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { font-weight: 600; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr; } }
a.tile { display: block; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
a.tile:hover { border-color: var(--accent); }
a.tile strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
a.tile span { color: var(--muted); font-size: .9rem; }
.ad { margin: 18px 0; min-height: 0; }
footer.site { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: .85rem; }
footer.site a { color: var(--muted); margin-right: 12px; }
footer.site p { margin: 6px 0; }
@media (max-width: 380px) { .row { grid-template-columns: 1fr; } .big { font-size: 1.6rem; } }
