@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f4f6fb;
  --bg2:      #ffffff;
  --bg3:      #edf0f7;
  --border:   #dde2ef;
  --border2:  #c8cfdf;
  --text1:    #111827;
  --text2:    #4b5563;
  --text3:    #9ca3af;
  --navy:     #1e3a5f;
  --navy2:    #162d4a;
  --navy-lt:  #e8eef7;
  --gold:     #b8860b;
  --gold-lt:  #fdf8e8;
  --green:    #059669;
  --green-lt: #d1fae5;
  --red:      #dc2626;
  --red-lt:   #fee2e2;
  --radius:   8px;
  --radius-lg:14px;
  --shadow:   0 1px 4px rgba(0,0,0,0.07);
  --shadow-lg:0 4px 20px rgba(0,0,0,0.10);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: var(--bg); color: var(--text1);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* ── NAV ── */
.nav {
  background: var(--navy); border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 28px; height: 56px;
  display: flex; align-items: center; gap: 0;
  position: sticky; top: 0; z-index: 100;
}
.nav-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 800; color: #fff;
  letter-spacing: -0.02em; margin-right: 32px; flex-shrink: 0;
}
.nav-logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.nav-links { display: flex; gap: 0; overflow-x: auto; flex: 1; }
.nav-link {
  font-size: 13px; color: rgba(255,255,255,0.6);
  padding: 0 14px; height: 56px;
  display: flex; align-items: center;
  border-bottom: 2px solid transparent;
  transition: all 0.15s; white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-link.active { color: #fff; border-color: #f0c040; font-weight: 600; }
.nav-right { margin-left: auto; font-size: 11px; color: rgba(255,255,255,0.4); flex-shrink: 0; padding-left: 16px; }

/* ── PAGE ── */
.page { padding: 32px 24px 64px; max-width: 1100px; margin: 0 auto; }
.page-sm { max-width: 820px; }

/* ── HERO ── */
.doc-hero { margin-bottom: 24px; }
.doc-hero-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--navy);
  background: var(--navy-lt); padding: 3px 12px; border-radius: 100px; margin-bottom: 10px;
}
.doc-hero h1 { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; margin-bottom: 5px; }
.doc-hero p { font-size: 13px; color: var(--text2); line-height: 1.7; }

/* ── TWO COLUMN LAYOUT ── */
.doc-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }

/* ── FORM CARD ── */
.form-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow); position: sticky; top: 76px;
}
.form-card-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text3); margin-bottom: 16px;
  display: flex; align-items: center; gap: 7px;
}
.form-card-title::before {
  content: ''; width: 3px; height: 13px;
  background: var(--navy); border-radius: 2px; display: inline-block;
}
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.form-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text2); }
.form-input, .form-select, .form-textarea {
  padding: 9px 12px; border: 1px solid var(--border2); border-radius: var(--radius);
  font-size: 13px; font-family: inherit; outline: none;
  background: var(--bg2); color: var(--text1); transition: border-color 0.15s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}
.form-textarea { resize: vertical; min-height: 72px; line-height: 1.6; }
.form-hint { font-size: 11px; color: var(--text3); }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── PRINT BUTTON ── */
.print-btn {
  width: 100%; padding: 12px; border-radius: var(--radius-lg);
  background: var(--navy); color: #fff; font-size: 14px; font-weight: 800;
  border: none; cursor: pointer; font-family: inherit; letter-spacing: -0.01em;
  transition: background 0.15s; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px;
}
.print-btn:hover { background: var(--navy2); }
.secondary-btn {
  width: 100%; padding: 9px; border-radius: var(--radius);
  background: var(--bg3); color: var(--text2); font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); cursor: pointer; font-family: inherit;
  transition: all 0.15s; margin-top: 8px;
}
.secondary-btn:hover { background: var(--border); }

/* ── DOCUMENT PREVIEW ── */
.doc-preview-wrap {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.doc-preview-toolbar {
  background: var(--bg3); padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.doc-preview-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text3); }
.doc-preview-actions { display: flex; gap: 6px; }
.toolbar-btn {
  font-size: 11px; padding: 4px 12px; border-radius: 6px;
  border: 1px solid var(--border2); background: var(--bg2); color: var(--text2);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.toolbar-btn:hover { background: var(--navy-lt); border-color: var(--navy); color: var(--navy); }

/* ── ACTUAL DOCUMENT ── */
.doc-paper {
  padding: 48px 52px; font-family: '바탕', 'Batang', 'NanumMyeongjo', Georgia, serif;
  font-size: 14px; line-height: 1.9; color: #1a1a1a; min-height: 900px;
  background: #fff;
}
.doc-paper.print-mode { padding: 32px; }
.doc-title-area { text-align: center; margin-bottom: 36px; }
.doc-main-title {
  font-size: 26px; font-weight: 900; letter-spacing: 0.15em;
  border-bottom: 3px double #1a1a1a; padding-bottom: 10px; margin-bottom: 10px;
  display: inline-block;
}
.doc-sub-title { font-size: 14px; color: #444; letter-spacing: 0.05em; }
.doc-meta-table { width: 100%; border-collapse: collapse; margin-bottom: 28px; }
.doc-meta-table td { padding: 7px 12px; border: 1px solid #ccc; font-size: 13px; vertical-align: top; }
.doc-meta-table .key { background: #f5f5f5; font-weight: 700; width: 100px; white-space: nowrap; }
.doc-body-text { margin-bottom: 20px; text-indent: 1em; line-height: 2; }
.doc-body-text.no-indent { text-indent: 0; }
.doc-section-title { font-weight: 700; margin: 20px 0 8px; font-size: 15px; }
.doc-claim-item { padding: 6px 0 6px 1.5em; position: relative; }
.doc-claim-item::before { content: '1.'; position: absolute; left: 0; }
.doc-date-area { text-align: center; margin: 36px 0 24px; font-size: 15px; font-weight: 600; }
.doc-sign-area { margin-top: 28px; }
.doc-sign-row {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 16px; margin-bottom: 12px; font-size: 14px;
}
.doc-sign-label { min-width: 60px; text-align: right; font-weight: 600; }
.doc-sign-value { min-width: 200px; border-bottom: 1px solid #999; padding-bottom: 2px; }
.doc-sign-stamp { width: 60px; height: 60px; border: 2px solid #c00; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #c00; font-size: 12px; font-weight: 700; margin-left: 8px; flex-shrink: 0; letter-spacing: 0.05em; }
.doc-footer-note { border-top: 1px solid #ccc; margin-top: 32px; padding-top: 12px; font-size: 12px; color: #666; }
.doc-amount { font-size: 16px; font-weight: 700; }
.doc-highlight { background: #fffbcc; padding: 2px 4px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.doc-table th { background: #f0f0f0; padding: 7px 10px; border: 1px solid #ccc; font-size: 12px; font-weight: 700; text-align: center; }
.doc-table td { padding: 7px 10px; border: 1px solid #ccc; font-size: 13px; }
.doc-table .right { text-align: right; }
.doc-table .center { text-align: center; }
.doc-table tfoot td { background: #f5f5f5; font-weight: 700; }

/* ── AD ── */
.ad-slot { background: var(--bg2); border: 1px dashed var(--border2); border-radius: var(--radius); padding: 13px; text-align: center; margin: 16px 0; }
.ad-slot p { font-size: 11px; color: var(--text3); }

/* ── HUB GRID ── */
.hub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hub-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; display: block;
  box-shadow: var(--shadow); transition: all 0.15s;
}
.hub-card:hover { border-color: var(--navy); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.hub-card-icon { font-size: 26px; margin-bottom: 10px; }
.hub-card-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--navy); margin-bottom: 3px; }
.hub-card-name { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 5px; }
.hub-card-desc { font-size: 12px; color: var(--text2); line-height: 1.6; }

/* ── BLOG ── */
.blog-list { display: flex; flex-direction: column; gap: 10px; }
.blog-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  transition: border-color 0.15s; box-shadow: var(--shadow);
}
.blog-card:hover { border-color: var(--navy); }
.blog-card-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.blog-card-desc { font-size: 12px; color: var(--text2); }
.blog-arrow { color: var(--text3); font-size: 14px; flex-shrink: 0; margin-left: 16px; }

/* ── ARTICLE ── */
.article h2 { font-size: 19px; font-weight: 800; margin: 2rem 0 0.75rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.article h3 { font-size: 15px; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.article p { font-size: 14px; line-height: 1.9; color: var(--text2); margin-bottom: 0.9rem; }
.article ul, .article ol { padding-left: 1.4rem; margin-bottom: 0.9rem; }
.article li { font-size: 14px; line-height: 1.9; color: var(--text2); margin-bottom: 4px; }
.article strong { color: var(--text1); font-weight: 700; }
.tip-box { background: var(--navy-lt); border-left: 3px solid var(--navy); border-radius: var(--radius); padding: 14px 18px; margin: 1.5rem 0; }
.tip-box p { color: var(--navy2); margin: 0; font-size: 13px; }
.warn-box { background: #fff8e6; border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 14px 18px; margin: 1.5rem 0; }
.warn-box p { color: #7a5800; margin: 0; font-size: 13px; }

/* ── FOOTER ── */
.footer { background: var(--navy); border-top: 1px solid rgba(255,255,255,0.08); padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; margin-top: 48px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,0.45); }
.footer-links a:hover { color: rgba(255,255,255,0.75); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.35); }

/* ── BADGE ── */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.badge-navy { background: var(--navy-lt); color: var(--navy2); }
.badge-gold { background: var(--gold-lt); color: var(--gold); }
.badge-green { background: var(--green-lt); color: #065f46; }

/* ── SECTION TITLE ── */
.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 14px; }

/* ── PRINT ── */
@media print {
  .nav, .form-card, .ad-slot, .doc-preview-toolbar, .footer,
  .no-print, .doc-hero { display: none !important; }
  body { background: white; }
  .doc-layout { display: block; }
  .doc-preview-wrap { border: none; box-shadow: none; }
  .page { padding: 0; max-width: 100%; }
  .doc-paper { padding: 20px; }
}

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { padding: 0 16px; }
  .page { padding: 20px 16px 48px; }
}
@media (max-width: 500px) {
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .doc-paper { padding: 24px 20px; }
}
