:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1a1f36;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #ecfdf5;
  --accent-text: #047857;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -.02em;
}
.logo:hover { text-decoration: none; }
.logo span { color: var(--brand); }
.logo-mark { width: 22px; height: 22px; border-radius: 6px; display: block; }
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: .92rem; font-weight: 600; }
.nav-links a:hover { color: var(--brand); text-decoration: none; }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }
.hero { text-align: center; padding: 40px 20px 10px; }
.hero h1 { font-size: 2rem; margin: 0 0 10px; letter-spacing: -.03em; }
.hero p { color: var(--muted); font-size: 1.05rem; margin: 0 auto; max-width: 640px; }

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.card h2 { margin-top: 0; font-size: 1.4rem; letter-spacing: -.02em; }

/* Tool grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tool {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.tool:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16,24,40,.10); text-decoration: none; }
.tool .emoji { font-size: 1.6rem; }
.tool h3 { margin: 10px 0 6px; color: var(--text); font-size: 1.1rem; }
.tool p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .82rem; font-weight: 400; }
input[type="number"], input[type="text"], input[type="date"], select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 140px; }

button.btn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s ease;
}
button.btn:hover { background: var(--brand-dark); }

/* Result */
.result { margin-top: 22px; padding: 22px; background: var(--accent); border-radius: 12px; display: none; }
.result.show { display: block; }
.result .big { font-size: 2rem; font-weight: 800; color: var(--accent-text); letter-spacing: -.02em; }
.result .label { color: var(--muted); font-size: .9rem; }
.breakdown { margin-top: 16px; width: 100%; border-collapse: collapse; }
.breakdown td { padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: .95rem; }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Article / SEO content */
.article { color: #374151; }
.article h2 { font-size: 1.25rem; margin-top: 28px; }
.article h3 { font-size: 1.05rem; margin-top: 20px; }
.article ul { padding-left: 20px; }
.article li { margin-bottom: 6px; }
.faq dt { font-weight: 700; margin-top: 16px; }
.faq dd { margin: 4px 0 0; color: var(--muted); }
.note { font-size: .85rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; margin-top: 20px; }

/* Ad slot */
.ad-slot {
  margin: 24px auto;
  max-width: 960px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #fafbff, #fafbff 10px, #f1f4fb 10px, #f1f4fb 20px);
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: #aab2c5;
  font-size: .8rem;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); color: var(--muted); }
.site-footer .inner { max-width: 960px; margin: 0 auto; padding: 28px 20px; font-size: .88rem; }
.site-footer a { color: var(--muted); }
.site-footer .links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .card { padding: 20px; }
}
