:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5d6b7c;
  --line: #e3e9f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf1ff;
  --accent: #0f9d6b;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.7;
  font-size: 16px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

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; justify-content: space-between; height: 56px; }
.logo { font-weight: 800; font-size: 18px; color: var(--text); }
.logo span { color: var(--brand); }
nav a { margin-left: 16px; color: var(--muted); font-size: 14px; font-weight: 600; }
nav a:hover { color: var(--brand); text-decoration: none; }

main { padding: 24px 0 48px; }
h1 { font-size: 26px; line-height: 1.35; margin: 8px 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 21px; margin: 36px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); margin-bottom: 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

/* 폼 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field { position: relative; }
input[type=number], select {
  width: 100%;
  padding: 12px 44px 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 17px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
select { padding-right: 14px; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
button.primary {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
button.primary:hover { background: var(--brand-dark); }

/* 결과 */
.result-hero { text-align: center; padding: 8px 0 4px; }
.result-hero .label { color: var(--muted); font-size: 14px; }
.result-hero .big { font-size: 38px; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.result-hero .sub { color: var(--muted); font-size: 14px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 4px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
thead th { background: #f1f5fa; font-size: 13px; color: var(--muted); }
tr.total td { font-weight: 800; border-top: 2px solid var(--text); }
.table-scroll { overflow-x: auto; }

/* 광고 자리 */
.ad-slot {
  margin: 20px 0;
  min-height: 100px;
  text-align: center;
}

/* 홈 카드 */
.tool-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--text);
}
.tool:hover { border-color: var(--brand); text-decoration: none; }
.tool strong { display: block; font-size: 17px; margin-bottom: 4px; }
.tool span { color: var(--muted); font-size: 14px; }
.tool.soon { opacity: .6; pointer-events: none; }
.badge { display: inline-block; font-size: 11px; background: var(--brand-soft); color: var(--brand); padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: middle; }

details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 8px 0 0; color: var(--muted); }

.notice { font-size: 13px; color: var(--muted); background: #f1f5fa; border-radius: 10px; padding: 12px 14px; }

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

@media (max-width: 560px) {
  h1 { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .tool-list { grid-template-columns: 1fr; }
  .result-hero .big { font-size: 32px; }
  nav a { margin-left: 9px; font-size: 13px; }
  nav a.opt { display: none; }
}
