/* 청년 지원금 체크 — 공통 스타일
   모바일 우선. 외부 폰트·스크립트 의존 없음. */

:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f5f7fb;
  --card: #ffffff;
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-soft: #eef3ff;
  --teal: #0f766e;
  --teal-soft: #e6f6f3;
  --amber: #b45309;
  --amber-soft: #fef6e7;
  --rose: #be123c;
  --rose-soft: #fdeef1;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .16);
  --wrap: 720px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

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

/* ── 헤더 ───────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 16px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, #1d4ed8, #0f766e);
  color: #fff;
  font-size: .92rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  letter-spacing: 0;
}

.brand small {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
  line-height: 1.2;
}

.nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  width: 100%;
  padding: 0 0 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  flex: 0 0 auto;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  white-space: nowrap;
}
.nav a:hover { border-color: #c7d2fe; color: var(--primary); }
.nav a[aria-current="page"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── 레이아웃 ───────────────────────── */
main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 16px 8px;
}

.page-head { padding: 6px 0 14px; }

.crumbs {
  font-size: .78rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }

h1 {
  font-size: 1.5rem;
  line-height: 1.34;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  font-weight: 800;
}

h2 {
  font-size: 1.16rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 34px 0 10px;
  font-weight: 800;
  scroll-margin-top: 72px;
}

h3 {
  font-size: 1rem;
  margin: 20px 0 6px;
  font-weight: 700;
  scroll-margin-top: 72px;
}

p { margin: 0 0 12px; }
.lead { color: var(--ink-soft); font-size: .97rem; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

ul, ol { margin: 0 0 12px; padding-left: 1.2rem; }
li { margin-bottom: 5px; }

strong { font-weight: 700; }

.meta-line {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 14px;
}

/* ── 안내 박스 ──────────────────────── */
.note {
  background: var(--primary-soft);
  border: 1px solid #dbe6ff;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: .88rem;
  color: #17337a;
  margin: 0 0 18px;
}
.note strong { color: #0f2a63; }

.note.warn {
  background: var(--amber-soft);
  border-color: #f6e0b8;
  color: #7c3f0a;
}
.note.warn strong { color: #6b3208; }

.note.quiet {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--ink-soft);
}

/* ── 카드 ───────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin: 0 0 14px;
}

/* ── 계산기 폼 ──────────────────────── */
.calc fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}
.calc legend {
  font-weight: 800;
  font-size: .95rem;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-no {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .76rem;
  font-weight: 800;
}

.field { margin: 0 0 14px; }
.field:last-child { margin-bottom: 0; }

.field > label,
.field-label {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}

.field .hint {
  display: block;
  font-size: .76rem;
  color: var(--muted);
  font-weight: 500;
  margin: 5px 0 0;
  line-height: 1.5;
}

input[type="number"],
select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

input[type="number"]:focus,
select:focus {
  outline: 2px solid #93b4ff;
  outline-offset: 1px;
  border-color: var(--primary);
}

.choices { display: grid; gap: 8px; }

.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: .9rem;
  cursor: pointer;
  line-height: 1.45;
}
.choice input {
  appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}
.choice input:checked { border-color: var(--primary); }
.choice input:checked::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
}
.choice:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.choice input:focus-visible { outline: 2px solid #93b4ff; outline-offset: 2px; }
.choice span { flex: 1; }

.sub-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}
.sub-box .field-label { font-size: .82rem; }
.ratio-out {
  font-size: .84rem;
  color: var(--ink-soft);
  margin: 8px 0 0;
  min-height: 1.4em;
}
.ratio-out b { color: var(--primary-dark); }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 420px) {
  .row-2 { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
  box-shadow: 0 8px 18px -10px rgba(29, 78, 216, .9);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost {
  background: #fff;
  border-color: #cbd5e1;
  color: var(--ink-soft);
  font-size: .85rem;
  padding: 9px 14px;
}
.btn-ghost:hover { border-color: #93b4ff; color: var(--primary); }

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}

/* ── 결과 ───────────────────────────── */
#result { scroll-margin-top: 70px; }

.result-summary {
  background: linear-gradient(150deg, #10306e, #0f5f5a);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  margin: 6px 0 14px;
  box-shadow: var(--shadow);
}
.result-summary h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: #fff;
}
.result-summary .counts {
  font-size: .86rem;
  color: #d8e6ff;
  margin: 0 0 12px;
}
.total-amount {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.total-cap {
  font-size: .78rem;
  color: #c9dcff;
  margin: 6px 0 0;
  line-height: 1.55;
}
.total-sub {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  font-size: .82rem;
  color: #e4edff;
}

.prog {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 0 0 10px;
  border-left: 4px solid #cbd5e1;
}
.prog.ok { border-left-color: #0f766e; }
.prog.check { border-left-color: #d97706; }
.prog.no { border-left-color: #cbd5e1; background: #fbfcfd; }

.prog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.prog-name {
  font-weight: 800;
  font-size: .98rem;
  letter-spacing: -0.02em;
  margin: 0;
}
.badge {
  flex: 0 0 auto;
  font-size: .7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.ok { background: var(--teal-soft); color: var(--teal); }
.badge.check { background: var(--amber-soft); color: var(--amber); }
.badge.no { background: #eef2f7; color: var(--muted); }

.prog-amount {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 6px 0 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.prog.no .prog-amount { color: var(--muted); font-weight: 700; font-size: .95rem; }

.prog-why {
  font-size: .84rem;
  color: var(--ink-soft);
  margin: 6px 0 0;
}
.prog-why ul { margin: 4px 0 0; padding-left: 1.05rem; }
.prog-why li { margin-bottom: 2px; }

.prog-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: .79rem;
  color: var(--muted);
}
.prog-foot a {
  margin-left: auto;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.prog-foot a:hover { text-decoration: underline; }

.tag-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 2px 7px;
  font-weight: 600;
}

/* ── 가이드 본문 ────────────────────── */
.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 16px 8px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.toc {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 18px;
  font-size: .86rem;
}
.toc p { margin: 0 0 6px; font-weight: 800; font-size: .82rem; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.15rem; }
.toc li { margin-bottom: 3px; }
.toc a { text-decoration: none; }

.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  min-width: 340px;
}
caption {
  caption-side: top;
  text-align: left;
  font-size: .76rem;
  color: var(--muted);
  padding: 8px 10px 6px;
}
th, td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: #f8fafc;
  font-weight: 700;
  font-size: .8rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-em { font-weight: 700; color: var(--primary-dark); }

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.check-list li {
  position: relative;
  padding: 8px 0 8px 26px;
  border-bottom: 1px dashed var(--line);
  font-size: .9rem;
  margin: 0;
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #94a3b8;
  border-radius: 4px;
}
.check-list li b { display: block; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.faq details:last-child { border-bottom: 0; }
.faq summary {
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 700;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  font-size: .88rem;
  color: var(--ink-soft);
  margin: 8px 0 2px;
}

.src-list {
  font-size: .82rem;
  color: var(--muted);
  padding-left: 1.1rem;
  margin: 0 0 14px;
}
.src-list li { margin-bottom: 4px; }
.src-list a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: #cbd5e1; }

.cta-box {
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
      flex-wrap: wrap;
}
.cta-box p { margin: 0; font-size: .88rem; color: #17337a; font-weight: 600; }
.cta-box .btn { flex: 0 0 auto; }

.guide-cards {
  display: grid;
  gap: 10px;
  margin: 0 0 8px;
}
@media (min-width: 560px) {
  .guide-cards { grid-template-columns: 1fr 1fr; }
}
.guide-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color .15s, transform .15s;
}
.guide-card:hover { border-color: #93b4ff; }
.guide-card .k {
  font-size: .72rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .02em;
}
.guide-card .t {
  font-weight: 800;
  font-size: .96rem;
  margin: 3px 0 4px;
  letter-spacing: -0.02em;
}
.guide-card .d { font-size: .8rem; color: var(--muted); line-height: 1.5; margin: 0; }

/* ── 푸터 ───────────────────────────── */
.site-footer {
  max-width: var(--wrap);
  margin: 26px auto 0;
  padding: 20px 16px 40px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.7;
}
.site-footer .fnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 12px;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer .disc { margin: 0 0 8px; }
.site-footer .fnote { margin: 10px 0 0; font-size: .74rem; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  position: fixed;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── 인쇄 ───────────────────────────── */
@media print {
  .site-header, .site-footer, .btn, .actions, .cta-box, .nav { display: none !important; }
  body { background: #fff; }
  .card, .article, .prog { box-shadow: none; break-inside: avoid; }
  .result-summary { background: #10306e !important; -webkit-print-color-adjust: exact; }
}
