:root {
  color-scheme: light;
  --navy: #102a43;
  --navy-2: #183b56;
  --blue: #176b87;
  --mint: #20a486;
  --mint-soft: #e6f7f2;
  --paper: #f7fafc;
  --white: #ffffff;
  --ink: #102a43;
  --muted: #627d98;
  --line: #d9e2ec;
  --shadow: 0 20px 50px rgba(16, 42, 67, .1);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(217, 226, 236, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 226, 236, .35) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1120px, calc(100% - 48px));
  min-height: 70px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--white);
  font-size: .9rem;
  box-shadow: inset 0 -4px 0 rgba(255, 255, 255, .09);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-nav a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.header-nav a:hover { color: var(--navy); text-decoration: underline; }

.page-wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: .875rem;
}

.breadcrumbs a { color: var(--blue); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.detail-hero,
.category-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-hero::after,
.category-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  top: -120px;
  border-radius: 50%;
  background: var(--mint-soft);
  pointer-events: none;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.16;
  letter-spacing: -.055em;
  word-break: keep-all;
}

.lead {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  word-break: keep-all;
}

.result-count {
  display: inline-flex;
  margin: 24px 0 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: #126f5d;
  font-size: .875rem;
  font-weight: 800;
}

.source-panel {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.source-panel strong { display: block; font-size: 1.05rem; }

.source-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .8rem;
}

.source-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .8rem;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 13px;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.primary-action:hover { background: var(--blue); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.info-grid article,
.document-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
}

.info-grid article { padding: 24px; }

.info-grid h2,
.section-heading h2,
.document-card h2 {
  margin: 0;
  line-height: 1.3;
  letter-spacing: -.035em;
  word-break: keep-all;
}

.info-grid h2 { font-size: 1.2rem; }
.info-grid p:last-child { margin: 10px 0 0; color: var(--muted); }

.content-section {
  margin-top: 28px;
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
}

.section-intro {
  max-width: 850px;
  margin: 0;
  color: #486581;
  font-size: 1.02rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.guide-grid article {
  padding: 24px;
  border-radius: 16px;
  background: #f7fafc;
  border: 1px solid #e6edf3;
}

.guide-grid h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -.025em;
}

.check-list {
  margin: 14px 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.check-list li + li { margin-top: 9px; }

.source-method {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-left: 4px solid var(--mint);
  border-radius: 0 12px 12px 0;
  background: var(--mint-soft);
  color: #315f56;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.step-list li {
  counter-increment: steps;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7fafc;
}

.step-list li::before {
  content: counter(steps);
  display: grid;
  width: 28px;
  height: 28px;
  margin-bottom: 13px;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: .8rem;
  font-weight: 800;
}

.step-list strong,
.step-list span { display: block; }
.step-list span { margin-top: 8px; color: var(--muted); font-size: .93rem; }

.notice-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff9e8;
  color: #765c18;
  font-size: .92rem;
}

.notice-box strong { margin-right: 7px; }

.text-page {
  max-width: 850px;
  margin: 0 auto;
}

.text-hero {
  padding: clamp(30px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.text-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }

.policy-section {
  margin-top: 22px;
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
}

.policy-section h2 { margin: 0 0 14px; font-size: 1.35rem; }
.policy-section h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.policy-section p { margin: 10px 0 0; color: var(--muted); }
.policy-section ul,
.policy-section ol { margin: 12px 0 0; padding-left: 1.2rem; color: var(--muted); }
.policy-section li + li { margin-top: 8px; }
.policy-section a { color: var(--blue); }

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 15px;
  background: var(--mint-soft);
}

.contact-card p { margin: 0; color: #315f56; }
.contact-card a {
  flex: none;
  padding: 11px 16px;
  border-radius: 11px;
  background: var(--navy);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.category-list,
.related { margin-top: 56px; }

.section-heading { margin-bottom: 18px; }
.section-heading h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.document-card {
  padding: 24px;
  display: flex;
  min-height: 250px;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.document-card:hover {
  transform: translateY(-3px);
  border-color: #9fb3c8;
  box-shadow: 0 14px 36px rgba(16, 42, 67, .1);
}

.document-card h2 { font-size: 1.18rem; }
.document-card h2 a { text-decoration: none; }
.document-card h2 a:hover { color: var(--blue); }
.document-card > p:not(.eyebrow) { margin: 13px 0; color: var(--muted); }

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
  padding-top: 14px;
  color: #829ab1;
  font-size: .8rem;
}

.text-link {
  margin-top: 16px;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover { color: var(--blue); text-decoration: underline; }

.empty-state {
  grid-column: 1 / -1;
  padding: 50px 24px;
  border: 1px dashed #bcccdc;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 36px;
  color: #829ab1;
  font-size: .8rem;
}

.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 9px; }
.site-footer a { color: #627d98; text-decoration: none; }
.site-footer a:hover { color: var(--navy); text-decoration: underline; }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-inner,
  .page-wrap,
  .site-footer { width: min(100% - 36px, 1120px); }
  .header-inner { min-height: 62px; }
  .header-nav { gap: 12px; }
  .header-nav a:nth-child(2) { display: none; }
  .page-wrap { padding-top: 26px; }
  .detail-hero,
  .category-hero { border-radius: 22px; }
  .source-panel { align-items: stretch; flex-direction: column; }
  .contact-card { align-items: stretch; flex-direction: column; }
  .primary-action { justify-content: center; }
  .card-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .document-card { min-height: 0; }
}

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