/* ===== 돈계산 공통 테마 ===== */
:root {
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-soft: #ccfbf1;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --danger-soft: #fee2e2;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px -12px rgba(15, 23, 42, .15);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 18px; }

/* 헤더 */
.site-head {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.head-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.3px; }
.brand:hover { color: var(--brand); }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--ink-2); font-size: 14px; font-weight: 600;
  padding: 7px 12px; border-radius: 9px; transition: .15s;
}
.nav a:hover { color: var(--brand-dark); background: var(--brand-soft); }
.nav a.active { color: var(--brand-dark); background: var(--brand-soft); }

main { padding: 28px 18px 56px; }

/* 히어로 */
.hero { padding: 46px 8px 40px; text-align: center; }
.hero h1 { font-size: clamp(26px, 4.6vw, 38px); line-height: 1.3; margin: 0 0 14px; letter-spacing: -.6px; }
.hero-sub { color: var(--ink-2); font-size: 16px; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; border-radius: 10px; padding: 11px 20px;
  font-size: 15px; font-weight: 700; border: 1px solid transparent; cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--card); color: var(--brand-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
button.btn-primary { font-family: inherit; }

/* 카드 그리드 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 26px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: .18s; display: block;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand); }
.card-icon { font-size: 26px; }
.card h2 { font-size: 17px; margin: 10px 0 6px; color: var(--ink); }
.card p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; }
.card-more { font-size: 13px; font-weight: 700; color: var(--brand); }

/* 페이지 타이틀 */
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.4px; }
.page-head p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* 계산기 레이아웃 */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 860px) {
  .calc-grid.cols-2 { grid-template-columns: 360px 1fr; align-items: start; }
}
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 14px; font-size: 16px; }
.panel h3 { margin: 20px 0 10px; font-size: 14px; color: var(--ink-2); }

/* 폼 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.field input[type="text"], .field input[type="number"], .field select {
  width: 100%; padding: 9px 11px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--brand); border-color: transparent; }
.field-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field-suffix { color: var(--ink-3); font-size: 13px; }
.quick {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid transparent; border-radius: 7px;
  padding: 4px 8px; margin: 3px 3px 0 0; cursor: pointer; user-select: none;
}
.quick:hover { background: #99f6e4; }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-chip { position: relative; }
.radio-chip input { position: absolute; opacity: 0; }
.radio-chip span {
  display: inline-block; font-size: 13px; font-weight: 600; padding: 7px 13px;
  border: 1px solid var(--line); border-radius: 9px; color: var(--ink-2); cursor: pointer; background: #fff;
}
.radio-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.form-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.note { font-size: 12.5px; color: var(--ink-3); background: #f1f5f9; border-radius: 9px; padding: 10px 12px; line-height: 1.6; margin-top: 14px; }

/* 결과 요약 */
.result-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px;
}
.stat { background: linear-gradient(135deg, var(--brand-soft), #f0fdfa); border: 1px solid #99f6e4; border-radius: 12px; padding: 12px 14px; }
.stat .stat-label { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.stat .stat-value { font-size: 18px; font-weight: 800; color: var(--brand-dark); margin-top: 2px; letter-spacing: -.3px; }
.stat .stat-sub { font-size: 12px; color: var(--ink-3); }
.stat.plain { background: #fff; border-color: var(--line); }
.stat.plain .stat-value { color: var(--ink); }

/* 표 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.tbl th, .tbl td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl th { background: #f8fafc; color: var(--ink-2); font-weight: 700; }
.tbl td:first-child, .tbl th:first-child { text-align: center; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl .hl { background: #fff7ed; font-weight: 700; }
.tbl .grace-row td { color: var(--ink-3); }
.tbl .grace-row td:first-child::after { content: " (거치)"; font-size: 11px; }

/* 푸터 */
.site-foot { border-top: 1px solid var(--line); background: var(--card); }
.site-foot .wrap { padding-top: 18px; padding-bottom: 22px; }
.site-foot p { margin: 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* 세부 */
.empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 26px 0; }
.muted { color: var(--ink-3); }
.divider { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
legend { font-weight: 700; font-size: 14px; padding: 0 6px 0 0; }
fieldset.group { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
@media (max-width: 560px) {
  .nav a { padding: 6px 8px; font-size: 13px; }
  .head-inner { height: 52px; }
}

/* 홈 개편: 정보 중심의 가벼운 핀테크 랜딩 */
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 17px; font-weight: 800; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; padding-top: 86px; padding-bottom: 76px; }
.hero-copy { max-width: 700px; }
.eyebrow, .section-kicker { margin: 0 0 16px; color: var(--brand-dark); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 5px #fef3c7; }
.hero h1 { margin-bottom: 18px; font-size: clamp(38px, 6vw, 70px); line-height: 1.12; letter-spacing: -.07em; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero-sub { font-size: 17px; line-height: 1.7; }
.hero-actions { justify-content: flex-start; align-items: center; margin-top: 28px; }
.btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; }
.text-link { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; font-weight: 700; }
.text-link:hover { color: var(--brand); }
.hero-note { display: flex; gap: 11px; align-items: center; min-width: 232px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.72); box-shadow: var(--shadow); }
.note-icon { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 900; }
.hero-note strong, .hero-note span { display: block; }
.hero-note strong { font-size: 13px; }
.hero-note span { color: var(--ink-2); font-size: 12px; }
.calculator-section { padding-bottom: 68px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.05em; }
.section-heading > p { margin: 0 0 3px; color: var(--ink-3); font-size: 12px; }
.card-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 0; }
.card { min-height: 260px; padding: 20px; border-radius: 12px; box-shadow: none; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-featured { background: var(--ink); border-color: var(--ink); }
.card-featured h3, .card-featured p { color: #fff; }
.card-featured p { color: #cbd5e1; }
.card-featured .card-more { color: #5eead4; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.icon-box { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-dark); font-size: 22px; font-weight: 800; }
.icon-loan { background: #134e4a; color: #5eead4; }
.card-label { padding: 5px 8px; border-radius: 5px; background: #f1f5f9; color: var(--ink-2); font-size: 10px; font-weight: 800; }
.card-featured .card-label { background: #1e293b; color: #99f6e4; }
.card h3 { margin: 0 0 9px; font-size: 18px; letter-spacing: -.04em; }
.card p { min-height: 64px; margin-bottom: 17px; font-size: 13px; line-height: 1.6; }
.card-more { font-size: 12px; font-weight: 800; }
.trust-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-top: 30px; padding-bottom: 70px; border-top: 1px solid var(--line); }
.trust-section div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; }
.trust-section strong { grid-row: span 2; color: var(--brand); font-size: 12px; }
.trust-section span { font-size: 14px; font-weight: 800; }
.trust-section p { grid-column: 2; margin: 2px 0 0; color: var(--ink-2); font-size: 12px; }
.board-entry { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 68px; padding: 25px 28px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.board-entry h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.04em; }
.board-entry p:last-child { margin: 0; color: var(--ink-2); font-size: 13px; }
.board-main { padding-top: 42px; padding-bottom: 70px; }
.breadcrumb { margin: 0 0 14px; color: var(--ink-3); font-size: 13px; }
.breadcrumb a { color: var(--brand-dark); font-weight: 700; }
.board-main h1 { margin: 0 0 10px; font-size: 30px; letter-spacing: -.05em; }
.board-meta { color: var(--ink-3); font-size: 13px; }
.board-main article h1 { margin-bottom: 8px; }
.board-list { display: grid; gap: 12px; }
.board-item { display: block; color: var(--ink); box-shadow: none; }
.board-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.board-item h2 { margin: 10px 0 4px; font-size: 17px; }
.board-item p { margin: 0; color: var(--ink-2); font-size: 13px; }
.community-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.community-cats span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 12px; font-weight: 700; }
.community-intro { color: var(--ink-2); font-size: 15px; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 12px; color: var(--ink-2); }
.keyword-list strong { color: var(--brand-dark); }
.board-back { margin-top: 16px; }
.foot-inner { display: flex; justify-content: space-between; gap: 12px; }
.site-foot p:first-child { color: var(--ink); font-weight: 800; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 60px; padding-bottom: 52px; } .hero-note { justify-self: start; } .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .nav { gap: 0; overflow-x: auto; max-width: 72vw; } .nav a { padding: 6px 7px; font-size: 12px; white-space: nowrap; } .hero h1 { font-size: 43px; } .mobile-break { display: block; } .section-heading { display: block; } .section-heading > p { margin-top: 7px; } .card-grid, .trust-section { grid-template-columns: 1fr; } .card { min-height: 0; } .card p { min-height: 0; } .trust-section { gap: 22px; padding-bottom: 45px; } .board-entry { display: block; margin-bottom: 45px; } .board-entry .btn { margin-top: 18px; } .foot-inner { display: block; text-align: center; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
