/* =========================================================
   2026 급여 계산기 — 신뢰 중심 디자인 시스템
   색채 심리: 블루(신뢰·안정), 에메랄드(금액·긍정), 앰버(주의)
   ========================================================= */

:root {
  /* Surfaces & background */
  --bg: #f1f5f9;          /* slate-100, 차분한 배경 */
  --bg-soft: #f8fafc;     /* slate-50 */
  --surface: #ffffff;
  --surface-2: #f8fafc;

  /* Text */
  --text: #0f172a;        /* slate-900 */
  --text-soft: #334155;   /* slate-700 */
  --muted: #64748b;       /* slate-500 */
  --line: #e2e8f0;        /* slate-200 */
  --line-strong: #cbd5e1; /* slate-300 */

  /* Brand — trust blue */
  --brand: #2563eb;       /* blue-600 */
  --brand-dark: #1d4ed8;  /* blue-700 */
  --brand-darker: #1e3a8a;/* blue-900 */
  --brand-soft: #eff6ff;  /* blue-50 */
  --brand-tint: #dbeafe;  /* blue-100 */

  /* Money — emerald */
  --money: #059669;       /* emerald-600 */
  --money-dark: #047857;  /* emerald-700 */
  --money-soft: #ecfdf5;  /* emerald-50 */
  --money-line: #a7f3d0;  /* emerald-200 */

  /* Caution — amber */
  --warn: #b45309;        /* amber-700 */
  --warn-soft: #fffbeb;   /* amber-50 */
  --warn-line: #fcd34d;   /* amber-300 */

  /* Effects */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 10px 24px -8px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 12px 28px -8px rgba(30, 58, 138, 0.18), 0 24px 48px -16px rgba(15, 23, 42, 0.16);
  --ring: 0 0 0 4px rgba(37, 99, 235, 0.14);
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(1200px 480px at 50% -120px, #e0ecff 0%, rgba(224, 236, 255, 0) 70%),
    var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.7;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-dark); text-underline-offset: 3px; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

/* ============================ Header / Nav ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.93rem;
  padding: 8px 13px;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-darker); }

.nav .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  font-weight: 800;
  padding: 8px 16px;
  margin-right: 4px;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, 0.5);
}
.nav .brand-link:hover { background: linear-gradient(135deg, var(--brand-dark), var(--brand-darker)); }
.brand-link .dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee2b8; box-shadow: 0 0 0 3px rgba(126, 226, 184, 0.3); }

/* ============================ Hero ============================ */
.hero {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 40px;
  align-items: center;
}
.hero-text { min-width: 0; }

.hero.hero-simple { grid-template-columns: 1fr; padding: 44px 0 12px; }
.hero.hero-simple .hero-copy { max-width: 720px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  padding: 6px 13px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-tint);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.83rem;
  border-radius: 999px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--money); }

.label {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
h1 .accent { color: var(--brand); }

h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; }

.hero-copy {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: 1.07rem;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.primary-link, .secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.primary-link {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.5);
}
.primary-link:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -6px rgba(37, 99, 235, 0.55); }
.secondary-link {
  color: var(--brand-dark);
  border: 1.5px solid var(--brand-tint);
  background: var(--surface);
}
.secondary-link:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow); }

/* Hero panel — 2026 기준 요약 카드 */
.hero-panel {
  background: linear-gradient(165deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero-panel::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  right: -70px; top: -70px;
  background: radial-gradient(circle, rgba(126, 226, 184, 0.35), transparent 70%);
}
.panel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; position: relative; }
.panel-top span { color: #bfdbfe; font-weight: 600; font-size: 0.9rem; }
.panel-top strong {
  font-size: 2.4rem; line-height: 1; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff, #d7e6ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-panel dl { margin: 0; display: grid; gap: 0; position: relative; }
.hero-panel dl div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-panel dl div:last-child { border-bottom: 0; }
.hero-panel dt { color: #c7d9f5; font-size: 0.95rem; }
.hero-panel dd { margin: 0; font-weight: 700; text-align: right; color: #fff; font-size: 1.02rem; }
.panel-foot {
  margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.16);
  color: #bfdbfe; font-size: 0.8rem; position: relative;
}

/* ============================ Trust strip ============================ */
.trust-strip {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 8px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.trust-strip span {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.trust-strip span::before {
  content: "";
  width: 18px; height: 18px; flex: 0 0 18px;
  background: var(--money-soft);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}

/* ============================ Main layout ============================ */
main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 64px; }

/* Notice / accuracy principle */
.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 24px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  align-items: start;
}
.notice .notice-icon {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--warn-line); border-radius: 12px;
  font-size: 1.4rem;
}
.notice .label { color: var(--warn); }
.notice h2 { margin: 0 0 8px; color: #78350f; font-size: 1.15rem; }
.notice p { margin: 0; color: #92400e; font-size: 0.97rem; }

/* Quick paths */
.quick-paths {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.quick-paths a {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.quick-paths a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-tint); }
.quick-paths .qp-icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--brand-soft); border-radius: 11px; margin-bottom: 4px; font-size: 1.25rem;
}
.quick-paths strong { color: var(--text); font-size: 1.02rem; font-weight: 700; }
.quick-paths span { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.quick-paths a::after {
  content: "→"; position: absolute; right: 16px; top: 18px;
  color: var(--brand); opacity: 0; transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition); font-weight: 700;
}
.quick-paths a:hover::after { opacity: 1; transform: translateX(0); }

.compact-links {
  margin-top: 16px;
  margin-bottom: 0;
}

.compact-links a {
  box-shadow: none;
  background: #fff;
}

/* ============================ Section heading ============================ */
.section-head { margin: 8px 0 18px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

/* ============================ Calculator cards ============================ */
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.calc-card, .article-card, .source-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.calc-card {
  padding: 24px;
  transition: box-shadow var(--transition), border-color var(--transition);
  scroll-margin-top: 84px;
}
.calc-card:hover { box-shadow: var(--shadow); }

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head .card-icon {
  width: 46px; height: 46px; flex: 0 0 46px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-tint));
  border-radius: 13px; font-size: 1.4rem;
}
.card-head .label { margin: 0 0 2px; }
.card-head h2 { margin: 0; font-size: 1.22rem; }

label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

input, select {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
input:hover, select:hover { border-color: var(--brand-tint); }
input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: var(--ring);
}

.check-row {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  line-height: 1.4;
  cursor: pointer;
}
.check-row input {
  flex: 0 0 20px; width: 20px; min-height: 20px;
  accent-color: var(--brand);
  cursor: pointer;
}

button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.5);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(37, 99, 235, 0.55); }
button:active { transform: translateY(0); }

/* Result block */
.result {
  margin-top: 18px;
  padding: 4px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--money-soft), #fff);
  border: 1px solid var(--money-line);
  min-height: 60px;
}
.result:empty {
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  padding: 18px;
}
.result:empty::before { content: "값을 입력하고 계산하기를 눌러 결과를 확인하세요."; color: var(--muted); font-size: 0.92rem; }

.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  border-bottom: 1px solid var(--money-line);
  padding: 12px 0;
}
.result-row:last-of-type { border-bottom: 0; }
.result-row span { color: var(--text-soft); font-size: 0.94rem; }
.result-row strong { color: var(--text); text-align: right; white-space: nowrap; font-weight: 700; font-size: 1.02rem; }

/* Highlight the headline figure (last row) */
.result-row.is-total {
  margin-top: 4px;
  border-top: 2px solid var(--money-line);
  border-bottom: 0;
  padding-top: 14px;
}
.result-row.is-total span { color: var(--money-dark); font-weight: 700; font-size: 1rem; }
.result-row.is-total strong { color: var(--money-dark); font-size: 1.4rem; letter-spacing: -0.02em; }

.result-note {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  padding-top: 10px;
  border-top: 1px dashed var(--money-line);
}

/* ============================ Source panel ============================ */
.source-panel, .article-card { padding: 26px; margin-top: 26px; }
.source-panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.source-panel li {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition);
}
.source-panel li:hover { border-color: var(--brand-tint); background: var(--brand-soft); }
.source-panel li::before {
  content: ""; width: 22px; height: 22px; flex: 0 0 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}
.source-panel a { font-weight: 600; text-decoration: none; }
.source-panel a:hover { text-decoration: underline; }

/* ============================ Article layout (sub pages) ============================ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.92fr);
  gap: 22px;
  align-items: start;
}
.article-card h2 { margin: 0 0 12px; }
.article-card h2 + p { margin-top: 0; }
.article-card p { margin: 0 0 14px; color: var(--text-soft); }
.article-card ul, .article-card ol { margin: 0 0 14px; padding-left: 22px; color: var(--text-soft); }
.article-card li { margin: 7px 0; }
.article-card strong { color: var(--text); }

.formula {
  display: block;
  margin: 4px 0 16px;
  padding: 16px 18px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-tint);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--brand-darker);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.5;
}

.rate-list { list-style: none !important; padding: 0 !important; display: grid; gap: 8px; }
.rate-list li {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 12px 14px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 !important;
}
.rate-list li .rate-val { font-weight: 800; color: var(--brand-dark); white-space: nowrap; }

.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; margin: 0 0 14px;
  background: var(--warn-soft); border: 1px solid var(--warn-line);
  border-radius: var(--radius-sm); color: #92400e; font-size: 0.94rem;
}
.callout::before { content: "ⓘ"; font-weight: 800; color: var(--warn); flex: 0 0 auto; }

/* ============================ Standalone (legal/info) ============================ */
.page-narrow { max-width: 760px; }
.page-narrow .article-card { margin-top: 0; }
.article-card h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 18px; }

/* ============================ Footer ============================ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 44px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; }
.footer-links a { color: var(--text-soft); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--brand-dark); text-decoration: underline; }
.footer p { margin: 0; max-width: 760px; line-height: 1.6; }
.footer .footer-brand { font-weight: 800; color: var(--text); font-size: 1.05rem; margin-bottom: 10px; }

/* ============================ Responsive ============================ */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 28px; }
  .quick-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap, .nav, .hero, main, .trust-strip, .footer-inner { width: min(100% - 28px, 1120px); }
  .hero { padding: 28px 0 20px; }
  h1 { font-size: 1.95rem; }
  .hero-actions a { width: 100%; }
  .quick-paths { grid-template-columns: 1fr; }
  .calc-card, .article-card, .source-panel { padding: 18px; }
  .notice { grid-template-columns: 1fr; padding: 18px; }
  .result-row { grid-template-columns: 1fr; gap: 3px; padding: 10px 0; }
  .result-row strong { text-align: left; white-space: normal; font-size: 1.1rem; }
  .result-row.is-total strong { font-size: 1.3rem; }
  .trust-strip { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .trust-strip span { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
