:root {
  --bg: #f7f7f2;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5f6b7a;
  --line: #dde3ea;
  --primary: #1f6feb;
  --primary-dark: #174ea6;
  --warning: #b45309;
  --danger: #b91c1c;
  --safe: #047857;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}
.logo { font-weight: 800; font-size: 22px; }
.nav, .footer-inner div { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }

.hero { padding: 72px 0 56px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 32px;
  align-items: center;
}
.eyebrow { color: var(--primary); font-weight: 700; margin: 0 0 8px; }
h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.08; margin: 0 0 20px; letter-spacing: -0.04em; }
h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 8px; letter-spacing: -0.03em; }
h3 { margin-top: 0; font-size: 22px; }
.hero-text { font-size: 19px; color: var(--muted); max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 800;
  cursor: pointer;
  font-size: 16px;
}
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { background: #e8eefc; color: var(--primary-dark); }
.button.full { width: 100%; margin-top: 18px; }
.hero-card, .panel, .content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero-card { padding: 32px; }
.hero-card strong { display: block; font-size: 30px; margin: 8px 0; }
.card-label { display: inline-block; color: var(--primary); font-weight: 800; }

.section { padding: 56px 0; }
.section.muted { background: #eef2f7; }
.section-title { margin-bottom: 24px; }
.calculator-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}
.panel { padding: 26px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label { display: grid; gap: 7px; }
label span { font-weight: 800; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  background: #fff;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
small { color: var(--muted); }

.amount-preview {
  min-height: 22px;
  margin-top: -2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f7fb;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.result-panel { position: sticky; top: 86px; }
.risk-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2f7;
  font-weight: 900;
  margin-bottom: 16px;
}
.risk-badge.safe { color: var(--safe); background: #dff7ed; }
.risk-badge.warn { color: var(--warning); background: #fff3d7; }
.risk-badge.danger { color: var(--danger); background: #ffe2e2; }
.result-list { display: grid; gap: 10px; }
.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.result-list span { color: var(--muted); }
.result-list strong { text-align: right; }
.result-comment {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: #f4f7fb;
  color: var(--muted);
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.content-card { padding: 24px; box-shadow: none; }
.site-footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); }

.simple-page { padding: 56px 0; }
.simple-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.simple-card h1 { font-size: 40px; }
.simple-card p, .simple-card li { color: var(--muted); }

@media (max-width: 1020px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero-grid, .calculator-layout, .content-grid { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .nav { display: none; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1120px); }
  .hero { padding: 48px 0 32px; }
  .section { padding: 36px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .panel, .hero-card, .simple-card { padding: 20px; border-radius: 20px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner div { flex-wrap: wrap; }
  .button { width: 100%; }
}
