/* =========================================================
   계산hub — 공유 스타일
   디자인: 급여명세서(ledger) 모티프 · 잉크네이비 + 민트
   외부요청 0 · 시스템 폰트 스택 · 모바일 퍼스트
   ========================================================= */

:root {
  --ink: #14203A;
  --ink-soft: #55607A;
  --ink-faint: #8A93A6;
  --bg: #EDF1F6;
  --surface: #FFFFFF;
  --surface-2: #F6F8FB;
  --mint: #0FB98A;
  --mint-deep: #0A8E69;
  --mint-wash: #E4F6EF;
  --coral: #E0544B;
  --coral-wash: #FBEAE8;
  --line: #DCE3EC;
  --line-strong: #C3CDDB;

  --font-sans: "Apple SD Gothic Neo", "Pretendard", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Malgun Gothic", "맑은 고딕", Roboto, sans-serif;
  --font-num: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, "Consolas",
    "Roboto Mono", monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,32,58,.06), 0 8px 24px rgba(20,32,58,.07);
  --shadow-lg: 0 4px 12px rgba(20,32,58,.08), 0 24px 60px rgba(20,32,58,.12);
  --wrap: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

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

h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; margin: 0; font-weight: 800; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* -------- eyebrow / label -------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mint-deep);
  margin-bottom: 12px;
}

/* -------- header / nav -------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(237,241,246,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 17px; color: var(--ink);
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-num); font-weight: 700; font-size: 15px;
  box-shadow: inset 0 0 0 2px var(--mint);
}
.nav-links { display: none; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink-soft); font-size: 14px; font-weight: 600;
  padding: 7px 11px; border-radius: 8px;
}
.nav-links a:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.nav-links a.active { color: var(--mint-deep); background: var(--mint-wash); }
@media (min-width: 820px) { .nav-links { display: flex; } }

/* -------- hero (hub) -------- */
.hero { padding: 56px 0 28px; }
.hero-grid { display: grid; gap: 34px; }
.hero h1 {
  font-size: clamp(30px, 7vw, 52px);
  letter-spacing: -.035em; line-height: 1.08;
}
.hero h1 .hl { color: var(--mint-deep); }
.hero p.lead {
  color: var(--ink-soft); font-size: clamp(16px, 2.4vw, 19px);
  margin: 18px 0 0; max-width: 30em;
}
.hero-cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

/* payslip motif in hero */
.payslip-demo {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
  border: 1px solid var(--line);
}
.payslip-demo .ps-top {
  background: var(--ink); color: #fff; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.payslip-demo .ps-top .t { font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.payslip-demo .ps-top .d { font-size: 12px; color: #9FB0C9; font-family: var(--font-num); }
.perf { height: 10px; background:
  radial-gradient(circle at 6px -2px, transparent 6px, var(--surface) 6px) repeat-x;
  background-size: 14px 10px; background-position: 0 0; margin-top: -1px; }
.ps-body { padding: 8px 20px 18px; }
.ps-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.ps-row .k { color: var(--ink-soft); }
.ps-row .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.ps-row.minus .v { color: var(--coral); }
.ps-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--mint-wash);
}
.ps-total .k { font-weight: 700; color: var(--mint-deep); }
.ps-total .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 22px; color: var(--mint-deep); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; }
  .hero { padding: 76px 0 40px; }
}

/* -------- buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; font-family: var(--font-sans);
  padding: 13px 22px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--mint); color: #05372a; box-shadow: 0 6px 18px rgba(15,185,138,.32); }
.btn-primary:hover { background: var(--mint-deep); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.btn-block { width: 100%; }

/* -------- section headings -------- */
.section { padding: 40px 0; }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: clamp(22px, 4vw, 30px); }
.section-head p { color: var(--ink-soft); margin: 8px 0 0; }

/* -------- calculator card grid (hub) -------- */
.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .card-grid { grid-template-columns: 1fr 1fr 1fr; } }

.calc-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 20px 20px;
  box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  position: relative; overflow: hidden;
}
.calc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); text-decoration: none; }
.calc-card .idx {
  font-family: var(--font-num); font-size: 12px; color: var(--ink-faint);
  letter-spacing: .04em;
}
.calc-card h3 { font-size: 18px; margin: 10px 0 6px; color: var(--ink); }
.calc-card p { color: var(--ink-soft); font-size: 13.5px; margin: 0; line-height: 1.55; }
.calc-card .go { margin-top: 14px; color: var(--mint-deep); font-weight: 700; font-size: 14px; }
.calc-card .go::after { content: " →"; }

/* -------- calculator page layout -------- */
.page-head { padding: 40px 0 6px; }
.breadcrumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-soft); }
.page-head h1 { font-size: clamp(26px, 5.4vw, 40px); letter-spacing: -.03em; }
.page-head .sub { color: var(--ink-soft); font-size: clamp(15px,2.2vw,18px); margin: 14px 0 0; max-width: 40em; }

.calc-layout { display: grid; gap: 22px; padding: 26px 0 8px; align-items: start; }
@media (min-width: 900px) { .calc-layout { grid-template-columns: 1fr 1fr; } }

/* -------- input panel -------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 22px;
}
.panel h2.panel-title { font-size: 16px; letter-spacing: -.01em; margin-bottom: 4px; }
.panel .panel-note { font-size: 13px; color: var(--ink-faint); margin: 0 0 18px; }

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .suffix {
  position: absolute; right: 14px; font-size: 13px; color: var(--ink-faint);
  pointer-events: none; font-weight: 600;
}
input[type="text"], input[type="number"], select {
  width: 100%; font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 16px; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 44px 12px 14px; transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
  -moz-appearance: textfield; appearance: none;
}
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select { padding-right: 36px; font-family: var(--font-sans); background-image:
  linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
  linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus {
  outline: none; border-color: var(--mint); background: var(--surface);
  box-shadow: 0 0 0 3px var(--mint-wash);
}
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }

/* segmented toggle */
.seg { display: inline-flex; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button {
  border: none; background: transparent; font-family: var(--font-sans);
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  padding: 8px 14px; border-radius: 7px; cursor: pointer; transition: all .12s ease;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.hint { font-size: 12.5px; color: var(--ink-faint); margin: 6px 0 0; }

/* -------- result / 명세서 (signature) -------- */
.statement {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
  position: sticky; top: 76px;
}
.statement .st-top {
  background: var(--ink); color: #fff; padding: 16px 22px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.statement .st-top .t { font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.statement .st-top .badge {
  font-size: 11px; font-family: var(--font-num); color: var(--ink);
  background: var(--mint); padding: 3px 8px; border-radius: 999px; font-weight: 700;
}
.st-hero {
  padding: 24px 22px 20px; text-align: center;
  background: linear-gradient(180deg, var(--mint-wash), var(--surface));
  border-bottom: 1px dashed var(--line-strong);
}
.st-hero .st-label { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mint-deep); }
.st-hero .st-big {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: clamp(30px, 8vw, 42px); color: var(--ink);
  letter-spacing: -.03em; line-height: 1.1; margin-top: 6px;
}
.st-hero .st-big .unit { font-size: .48em; font-weight: 700; color: var(--ink-soft); margin-left: 4px; letter-spacing: 0; }
.st-hero .st-sub { font-size: 13px; color: var(--ink-soft); margin-top: 6px; font-family: var(--font-num); }

.st-body { padding: 8px 22px 20px; }
.st-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.st-line:last-child { border-bottom: none; }
.st-line .k { color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.st-line .k .tag { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-faint); font-family: var(--font-num); }
.st-line .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; }
.st-line.minus .v { color: var(--coral); }
.st-line.plus .v { color: var(--mint-deep); }
.st-line.sum { border-top: 2px solid var(--ink); border-bottom: none; margin-top: 6px; padding-top: 13px; font-weight: 700; }
.st-line.sum .k { color: var(--ink); font-weight: 700; }
.st-line.sum .v { font-weight: 800; font-size: 15px; }
.st-section-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin: 16px 0 2px; }

.st-empty { padding: 40px 22px; text-align: center; color: var(--ink-faint); font-size: 14px; }

/* schedule table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 10px; }
table.sched { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 460px; }
table.sched th, table.sched td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); }
table.sched th { background: var(--surface-2); color: var(--ink-soft); font-weight: 600; font-size: 12px; position: sticky; top: 0; }
table.sched th:first-child, table.sched td:first-child { text-align: center; color: var(--ink-faint); }
table.sched td { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
table.sched tr:last-child td { border-bottom: none; }

/* -------- ad slot -------- */
.ad-slot {
  margin: 26px 0; padding: 0; text-align: center;
  min-height: 90px; display: flex; align-items: center; justify-content: center;
}
.ad-slot .ad-ph {
  width: 100%; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink-faint); font-size: 12px; padding: 30px 12px; background: var(--surface-2);
}

/* -------- content / article -------- */
.article { padding: 12px 0 20px; }
.article-inner { max-width: 720px; }
.article h2 { font-size: clamp(20px, 4vw, 26px); margin: 34px 0 12px; }
.article h3 { font-size: 17px; margin: 24px 0 8px; color: var(--ink); }
.article p { color: #35405A; margin: 12px 0; }
.article ul, .article ol { color: #35405A; padding-left: 20px; margin: 12px 0; }
.article li { margin: 6px 0; }
.article .callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--mint);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 20px 0; font-size: 14.5px;
}
.article .callout strong { color: var(--ink); }
.formula {
  font-family: var(--font-num); background: var(--ink); color: #DCE7F5;
  padding: 14px 16px; border-radius: var(--radius-sm); font-size: 13.5px;
  overflow-x: auto; margin: 14px 0; line-height: 1.7;
}
.formula .hl { color: var(--mint); }

/* FAQ */
.faq { margin-top: 14px; }
details.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 10px; overflow: hidden;
}
details.faq-item summary {
  cursor: pointer; padding: 16px 44px 16px 18px; font-weight: 600; color: var(--ink);
  position: relative; list-style: none; font-size: 15px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-num); font-size: 20px; color: var(--mint-deep); transition: transform .2s ease;
}
details.faq-item[open] summary::after { content: "−"; }
details.faq-item .faq-a { padding: 0 18px 16px; color: #35405A; font-size: 14.5px; }

/* related links */
.related { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 640px) { .related { grid-template-columns: 1fr 1fr; } }
.related a {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px 16px;
  transition: border-color .12s ease, transform .12s ease;
}
.related a:hover { border-color: var(--mint); transform: translateY(-2px); text-decoration: none; }
.related a .r-t { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.related a .r-d { font-size: 12.5px; color: var(--ink-soft); }
.related a .r-arrow { margin-left: auto; color: var(--mint-deep); font-weight: 700; }

/* -------- footer -------- */
.site-footer {
  background: var(--ink); color: #AEB9CC; margin-top: 50px;
  padding: 42px 0 34px; font-size: 14px;
}
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .f-brand { color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.site-footer p { margin: 8px 0; color: #8B97AD; max-width: 30em; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 7px 0; }
.site-footer a { color: #AEB9CC; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 22px; font-size: 12.5px; color: #6D7A91; }
.footer-bottom .disclaimer { max-width: none; }

/* -------- utility -------- */
.text-mint { color: var(--mint-deep); }
.text-coral { color: var(--coral); }
.mt-0 { margin-top: 0; }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--mint-deep); outline-offset: 2px; border-radius: 4px; }

/* animation */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .6s cubic-bezier(.2,.7,.3,1) both; }
.fade-up.d1 { animation-delay: .08s; }
.fade-up.d2 { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
