:root {
  --ink: #171725;
  --ink-2: #4c4c63;
  --line: #e4e4ee;
  --bg: #f8f8fc;
  --card: #ffffff;
  --accent: #5b3df5;
  --accent-2: #eeebff;
  --gold: #a9741a;
  --gold-2: #fdf3e2;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.66 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}

.wrap { width: min(780px, 100% - 32px); margin: 0 auto; }

.skip { position: absolute; left: -9999px; }

.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 9; }

header.site { background: #fff; border-bottom: 1px solid var(--line); }

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 0 10px;
}

.brand { font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }

nav.site { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }

nav.site::-webkit-scrollbar { display: none; }

nav.site a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

nav.site a[aria-current="page"] { background: var(--accent-2); color: var(--accent); font-weight: 700; }

main { padding: 22px 0 48px; }

h1 { font-size: clamp(25px, 6.4vw, 33px); line-height: 1.28; letter-spacing: -0.025em; margin: 0 0 12px; }

h2 { font-size: 20px; letter-spacing: -0.015em; margin: 34px 0 12px; }

h3 { font-size: 17px; margin: 22px 0 8px; }

p { margin: 0 0 12px; }

.lead { font-size: 17px; color: var(--ink-2); }

.muted { color: var(--ink-2); font-size: 13.5px; }

.accent { color: var(--accent); }

a { color: var(--accent); }

.crumb { font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }

.crumb a { color: var(--ink-2); }

section { margin-top: 28px; }

.hero .eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.calc { border-color: #dcd6ff; box-shadow: 0 10px 30px -18px rgba(91, 61, 245, 0.5); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

.field select,
.field input {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px 11px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.field select:focus,
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }

.result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }

.result .rcell {
  background: #f7f6ff;
  border-radius: 12px;
  padding: 12px;
}

.result .rcell b { display: block; font-size: 21px; letter-spacing: -0.02em; }

.result .rcell span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

.result .wide { grid-column: 1 / -1; background: var(--gold-2); }

.result .wide b { color: var(--gold); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; }

.stat b { display: block; font-size: 20px; letter-spacing: -0.02em; }

.stat span { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.t {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

table.t th,
table.t td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }

table.t th { background: #f6f6fb; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }

table.t tr:last-child td { border-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.pcard {
  display: block;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
}

.pcard b { display: block; font-size: 15.5px; margin-bottom: 4px; }

.pcard span { font-size: 13px; color: var(--ink-2); }

.links { padding-left: 18px; }

details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; }

details summary { cursor: pointer; font-weight: 700; font-size: 15.5px; }

details div { margin-top: 8px; font-size: 15px; color: var(--ink-2); }

.btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 700;
}

code { background: #f1f1f7; border-radius: 5px; padding: 1px 5px; font-size: 0.92em; }

ol, ul { padding-left: 20px; }

ol li, ul li { margin-bottom: 6px; }

footer.site { border-top: 1px solid var(--line); padding: 22px 0 40px; font-size: 13px; color: var(--ink-2); }

footer.site a { color: var(--ink-2); }

@media (max-width: 560px) {
  .grid, .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result { grid-template-columns: 1fr; }
  table.t th, table.t td { padding: 8px; font-size: 13.5px; }
}
