:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #5d6673;
  --line: #e2e6eb;
  --accent: #1f6feb;
  --accent-soft: #e8f0fe;
  --good: #137333;
  --warn: #b06000;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #171b21;
    --text: #e6e9ee;
    --muted: #9aa4b2;
    --line: #2a313a;
    --accent: #5b9bff;
    --accent-soft: #1b2738;
    --good: #5fd38d;
    --warn: #f0b45a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.65;
  word-break: keep-all;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

header.site { background: var(--surface); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.logo { font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
nav.top { display: flex; gap: 14px; overflow-x: auto; font-size: 14px; }
nav.top a { color: var(--muted); text-decoration: none; white-space: nowrap; }
nav.top a:hover, nav.top a[aria-current="page"] { color: var(--text); }

main { padding: 24px 0 48px; }
h1 { font-size: 26px; line-height: 1.3; margin: 8px 0 6px; }
h2 { font-size: 20px; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 24px 0 6px; }
.lead { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.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; }
.input-row { display: flex; align-items: center; gap: 8px; }
input[type="text"], input[type="number"], input[type="date"], select {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.unit { color: var(--muted); white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; }

button.primary {
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.result { margin-top: 16px; display: none; }
.result.show { display: block; }
.big {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}
.big .label { color: var(--muted); font-size: 14px; }
.big .value { font-size: 30px; font-weight: 800; }
.note { color: var(--warn); font-size: 14px; margin: 8px 0 0; }

table.breakdown { width: 100%; border-collapse: collapse; font-size: 15px; }
table.breakdown td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
table.breakdown td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
table.breakdown tr.total td { font-weight: 700; border-bottom: 0; }

table.ref { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
table.ref th, table.ref td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
table.ref th { background: var(--accent-soft); }

.ad-slot { margin: 24px 0; min-height: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--text);
}
.tile strong { display: block; font-size: 17px; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 14px; }
.tile:hover { border-color: var(--accent); }

article p, article li { font-size: 16px; }
.faq dt { font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: var(--text); }
.updated { color: var(--muted); font-size: 13px; }

footer.site { border-top: 1px solid var(--line); background: var(--surface); padding: 20px 0 32px; font-size: 13px; color: var(--muted); }
footer.site a { color: var(--muted); margin-right: 12px; }
@media (max-width: 520px) {
  table.ref { font-size: 13px; }
  table.ref th, table.ref td { padding: 6px 4px; }
}
