/* ============ FINTECH APP STYLE (Toss/KakaoPay inspired) ============ */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  /* Primary - Toss Blue 계열 */
  --primary: #3182f6;
  --primary-dark: #1b64da;
  --primary-light: #e8f3ff;
  --primary-bg: #f4f9ff;

  /* Secondary */
  --mint: #00c7b1;
  --mint-light: #e6f9f6;
  --purple: #8b5cf6;
  --purple-light: #f3efff;
  --coral: #ff6b6b;
  --coral-light: #ffeeee;
  --yellow: #ffc107;
  --yellow-light: #fff8e1;

  /* Neutrals - 토스 그레이 스케일 */
  --ink-900: #191f28;
  --ink-800: #333d4b;
  --ink-700: #4e5968;
  --ink-600: #6b7684;
  --ink-500: #8b95a1;
  --ink-400: #b0b8c1;
  --ink-300: #d1d6db;
  --ink-200: #e5e8eb;
  --ink-100: #f2f4f6;
  --ink-50: #f9fafb;
  --white: #ffffff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-900);
  background: var(--ink-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  letter-spacing: -0.3px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============ HEADER ============ */
header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--ink-200);
}

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-logo {
  width: 34px;
  height: 34px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text .name {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.5px;
}
.brand-text .tag {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 2px;
  font-weight: 500;
}

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.menu > li > a {
  display: block;
  padding: 9px 14px;
  color: var(--ink-700);
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.menu > li > a:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}

.menu-cta {
  background: var(--ink-900) !important;
  color: #fff !important;
  padding: 10px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
}

.menu-cta:hover {
  background: var(--ink-700) !important;
}

.has-sub { position: relative; }

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.18s;
  list-style: none;
  box-shadow: var(--shadow-lg);
}

.has-sub:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu a {
  display: block;
  padding: 10px 14px;
  color: var(--ink-700);
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  font-weight: 500;
}

.submenu a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.hamburger {
  display: none;
  background: var(--ink-100);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink-800);
  transition: 0.25s;
  border-radius: 1px;
}

.hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ POST HEADER ============ */
.post-header {
  background: #fff;
  padding: 40px 20px 32px;
}

.post-header-inner {
  max-width: 760px;
  margin: 0 auto;
}

.post-crumb {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-weight: 500;
}

.post-crumb a { color: var(--ink-600); }
.post-crumb a:hover { color: var(--primary); }
.post-crumb .sep { color: var(--ink-400); font-size: 11px; }

.post-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}

.post-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink-900);
  letter-spacing: -1px;
  margin-bottom: 18px;
  word-break: keep-all;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-500);
  padding-top: 16px;
  border-top: 1px solid var(--ink-200);
  flex-wrap: wrap;
  font-weight: 500;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-meta strong { color: var(--ink-700); font-weight: 600; }

/* ============ POST CONTENT ============ */
.post {
  padding: 32px 20px 60px;
  background: var(--ink-100);
}

.post-inner {
  max-width: 760px;
  margin: 0 auto;
}

/* 요약 카드 - 토스 스타일 */
.summary-card {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.summary-card .label {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
}

.summary-card ul {
  list-style: none;
  position: relative;
}

.summary-card li {
  padding: 7px 0 7px 22px;
  position: relative;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.2px;
}

.summary-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

.summary-card strong {
  font-weight: 700;
}

/* 목차 카드 */
.toc-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 24px;
  border: 1px solid var(--ink-200);
}

.toc-box .label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.toc-box .label::before {
  content: '';
  width: 4px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

.toc-box ol {
  list-style: none;
  counter-reset: toc;
}

.toc-box li {
  counter-increment: toc;
  padding: 4px 0;
}

.toc-box a {
  color: var(--ink-700);
  font-size: 14.5px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  transition: all 0.15s;
  font-weight: 500;
}

.toc-box a::before {
  content: counter(toc);
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
  flex-shrink: 0;
  min-width: 16px;
}

.toc-box a:hover {
  color: var(--primary);
  padding-left: 4px;
}

/* 본문 카드 */
.body-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  border: 1px solid var(--ink-200);
}

.body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-800);
  word-break: keep-all;
}

.body h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-900);
  margin: 48px 0 16px;
  letter-spacing: -0.5px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
}

.body h2:first-child { margin-top: 0; }

.body h2::before {
  content: '';
  width: 6px;
  height: 22px;
  background: var(--primary);
  border-radius: 3px;
  flex-shrink: 0;
}

.body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 32px 0 12px;
  letter-spacing: -0.3px;
}

.body p {
  margin-bottom: 16px;
}

.body strong {
  color: var(--ink-900);
  font-weight: 700;
}

.body em {
  font-style: normal;
  color: var(--primary);
  font-weight: 600;
}

.body a {
  color: var(--primary);
  font-weight: 500;
}

.body a:hover {
  text-decoration: underline;
}

.body ul, .body ol {
  margin-bottom: 20px;
  padding-left: 0;
  list-style: none;
}

.body ul li {
  padding: 5px 0 5px 22px;
  position: relative;
}

.body ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.body ol {
  counter-reset: oli;
}

.body ol li {
  padding: 6px 0 6px 34px;
  position: relative;
  counter-increment: oli;
}

.body ol li::before {
  content: counter(oli);
  position: absolute;
  left: 0;
  top: 7px;
  width: 24px;
  height: 24px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 강조 카드들 - 핀테크 풍 */
.tip-box, .warn-box, .info-box {
  border-radius: var(--radius-md);
  padding: 18px 22px 20px 56px;
  margin: 24px 0;
  font-size: 14.5px;
  line-height: 1.7;
  position: relative;
}

.tip-box {
  background: var(--yellow-light);
  color: var(--ink-800);
}

.warn-box {
  background: var(--coral-light);
  color: var(--ink-800);
}

.info-box {
  background: var(--primary-bg);
  color: var(--ink-800);
}

.tip-box::before, .warn-box::before, .info-box::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.tip-box::before { content: '💡'; background: var(--yellow); font-size: 15px; }
.warn-box::before { content: '!'; background: var(--coral); color: #fff; }
.info-box::before { content: 'i'; background: var(--primary); color: #fff; font-family: Georgia, serif; font-style: italic; }

.tip-box .label, .warn-box .label, .info-box .label {
  font-weight: 800;
  margin-bottom: 6px;
  font-size: 14px;
  letter-spacing: -0.2px;
}

.tip-box .label { color: #c27800; }
.warn-box .label { color: #d63b3b; }
.info-box .label { color: var(--primary-dark); }

/* 비교 테이블 - 토스 스타일 */
.cmp-table {
  width: 100%;
  margin: 24px 0;
  font-size: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-collapse: separate;
  border-spacing: 0;
}

.cmp-table thead { background: var(--ink-50); }

.cmp-table th {
  padding: 14px 12px;
  text-align: center;
  color: var(--ink-900);
  font-weight: 700;
  font-size: 13.5px;
  border-bottom: 1px solid var(--ink-200);
  letter-spacing: -0.2px;
}

.cmp-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--ink-100);
  text-align: center;
  vertical-align: middle;
  background: #fff;
  color: var(--ink-700);
  font-weight: 500;
}

.cmp-table tr:last-child td { border-bottom: none; }

.cmp-table td:first-child {
  font-weight: 700;
  color: var(--ink-900);
  background: var(--ink-50);
  text-align: left;
  padding-left: 18px;
}

.cmp-table .o {
  color: var(--primary);
  font-weight: 700;
}

.cmp-table .x {
  color: var(--coral);
  font-weight: 700;
}

/* Q&A 토글 - 토스 FAQ 스타일 */
.qna-list {
  margin: 24px 0;
  list-style: none !important;
  padding: 0 !important;
}

.qna-item {
  background: #fff;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--radius-md) !important;
  margin-bottom: 10px !important;
  padding: 0 !important;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.qna-item::before { display: none !important; }

.qna-item.open {
  box-shadow: var(--shadow-md);
  border-color: var(--primary) !important;
}

.qna-q-btn {
  width: 100%;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  font-family: inherit;
  background: #fff;
  transition: background 0.15s;
}

.qna-q-btn:hover { background: var(--ink-50); }

.qna-q-mark {
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.qna-item.open .qna-q-mark {
  background: var(--primary);
  color: #fff;
}

.qna-q-text {
  flex: 1;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.5;
  letter-spacing: -0.2px;
}

.qna-toggle {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--ink-500);
  transition: transform 0.3s;
  font-weight: 300;
}

.qna-item.open .qna-toggle { transform: rotate(180deg); color: var(--primary); }

.qna-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--ink-50);
}

.qna-a-inner {
  padding: 18px 22px 22px 64px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-700);
  border-top: 1px solid var(--ink-200);
}

/* CTA 카드 */
.cta-box {
  background: var(--ink-900);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  margin: 44px 0 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(49,130,246,0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-box h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
  letter-spacing: -0.5px;
  position: relative;
}

.cta-box p {
  margin-bottom: 22px;
  opacity: 0.8;
  font-size: 14.5px;
  position: relative;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  transition: all 0.18s;
  position: relative;
}

.cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* 작성자 카드 */
.author-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  margin: 32px 0 20px;
  border: 1px solid var(--ink-200);
}

.author-img {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.author-info { flex: 1; }
.author-name {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 14.5px;
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}
.author-bio { font-size: 12.5px; color: var(--ink-500); line-height: 1.5; }

/* 관련 글 */
.related {
  margin-top: 36px;
}

.related-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--ink-900);
  letter-spacing: -0.3px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.related-card {
  display: block;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  transition: all 0.18s;
}

.related-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  font-weight: 700;
}

.related-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 6px;
  line-height: 1.4;
  letter-spacing: -0.3px;
}

.related-card p {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.5;
}

/* ============ FOOTER ============ */
footer {
  background: #fff;
  color: var(--ink-600);
  padding: 44px 20px 28px;
  font-size: 13px;
  line-height: 1.7;
  border-top: 1px solid var(--ink-200);
}

.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink-200);
  margin-bottom: 24px;
}

.footer-brand-box .footer-brand {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.footer-brand-box .footer-brand .logo {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.footer-desc {
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.footer-col ul { list-style: none; }
.footer-col li { padding: 4px 0; }

.footer-col a {
  color: var(--ink-600);
  font-size: 13px;
  transition: color 0.15s;
  font-weight: 500;
}

.footer-col a:hover { color: var(--primary); }

.footer-notice {
  background: var(--ink-50);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.65;
  margin-bottom: 20px;
  letter-spacing: -0.1px;
}

.footer-notice strong {
  color: var(--ink-900);
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}

.footer-copy {
  text-align: center;
  font-size: 12px;
  color: var(--ink-500);
  padding-top: 16px;
  border-top: 1px solid var(--ink-200);
  font-weight: 500;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-wrap { padding: 12px 16px; }

  .menu {
    position: fixed;
    top: 62px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 62px);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transition: right 0.3s;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
  }
  .menu.active { right: 0; }
  .menu > li > a { padding: 14px 12px; font-size: 15px; }
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 6px 12px;
    margin-top: 0;
    background: transparent;
  }
  .submenu a { padding: 8px 10px; font-size: 13.5px; }
  .menu-cta { margin-top: 8px; text-align: center; }
  .hamburger { display: flex; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand-box { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .post-header { padding: 28px 16px 24px; }
  .post { padding: 24px 16px 50px; }
  .body-card { padding: 28px 22px; border-radius: var(--radius-md); }
  .body { font-size: 15.5px; }
  .body h2 { font-size: 20px; margin-top: 40px; }
  .body h3 { font-size: 16px; }
  .summary-card, .toc-box { padding: 20px 22px; }
  .tip-box, .warn-box, .info-box { padding: 16px 20px 18px 52px; }
  .cta-box { padding: 28px 22px; border-radius: var(--radius-lg); }
  .cta-box h3 { font-size: 20px; }
  .related-grid { grid-template-columns: 1fr; }
  .cmp-table { font-size: 13px; }
  .cmp-table th, .cmp-table td { padding: 11px 8px; }
  .cmp-table td:first-child { padding-left: 12px; }
  .qna-q-btn { padding: 16px 18px; gap: 10px; }
  .qna-q-text { font-size: 14.5px; }
  .qna-a-inner { padding: 16px 18px 20px 58px; font-size: 14px; }

  .footer-top { grid-template-columns: 1fr; gap: 20px; }
}
