@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@1.3.9/dist/web/variable/pretendardvariable.min.css');
:root {
  --cobalt:        #2F4FE0;   /* primary */
  --cobalt-strong: #2841C8;   /* hover */
  --cobalt-deep:   #2436A8;   /* text on light / deep */
  --cobalt-ink:    #2F3AAD;   /* badge text */
  --cobalt-50:     #F5F7FE;
  --cobalt-100:    #ECEFFD;
  --cobalt-150:    #DFE5FB;
  --cobalt-200:    #C6D0F6;
  --bg:            #F4F6FA;
  --ink:           #161A26;
  --ink-soft:      #4E5468;
  --ink-mute:      #6B7186;
  --ink-faint:     #8F95A8;
  --line:          #E4E8F0;
  --chip:          #EEF1F6;
  --card:          #FFFFFF;
  --ok:            #17935A;   /* 정상/진행 green */
  --danger:        #C0362F;   /* 공고·결항 red */
  --danger-soft:   #FDECEC;

  --r-lg: 20px;  --r-md: 16px;  --r-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(22,26,38,.04), 0 2px 6px -2px rgba(22,26,38,.06);
  --shadow-md: 0 14px 30px -16px rgba(30,45,120,.30), 0 2px 6px -2px rgba(22,26,38,.06);
  --container: 1040px;

}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
  word-break: keep-all; overflow-wrap: break-word; }   /* 한글은 낱말 단위로 줄바꿈 */
button, input { font-family: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* 아이콘(site.js의 ic()) — 글자 크기·색을 그대로 따른다 */
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; fill: currentColor; vertical-align: -0.18em; }
/* 큰 아이콘 자리(홈 카드·페이지 머리·분야 카드) — 모양·색을 하나로 맞춘다 */
.icon-tile { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px;
  background: var(--cobalt-50); color: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt-150); }
.icon-tile .ic { width: 28px; height: 28px; }
/* 공고 있음 표시 점 */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #E5484D;
  box-shadow: 0 0 0 3px rgba(229,72,77,.18); margin-right: 6px; vertical-align: 0.08em; flex-shrink: 0; }
/* 상태 점 — 글자색을 따른다 */
.st-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  margin-right: 6px; vertical-align: 0.08em; flex-shrink: 0; }
.st-dot.ok { background: var(--ok); }

/* ── 상단 내비게이션 (site.js가 모든 페이지에 넣는다) ── */
.topnav { position: sticky; top: 0; z-index: 1200; background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line); }
.topnav-in { max-width: var(--container); margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.08rem; color: var(--ink);
  text-decoration: none; letter-spacing: -0.03em; flex-shrink: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; color: #fff; display: grid; place-items: center;
  background: linear-gradient(135deg, #4A72F5, #1E3BC0); box-shadow: 0 4px 10px -4px rgba(47,79,224,.6); }
.brand-mark .ic { width: 20px; height: 20px; }
.navlinks { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.navlinks::-webkit-scrollbar { display: none; }
.nav-link { padding: 8px 13px; border-radius: 10px; font-size: 0.93rem; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; white-space: nowrap; transition: background .12s, color .12s; }
.nav-link:hover { background: var(--chip); color: var(--ink); }
.nav-link.active { background: var(--cobalt-100); color: var(--cobalt-deep); font-weight: 700; }

/* ── 페이지 머리 (site.js가 넣는다) ── */
.page-hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.hero-in { max-width: var(--container); margin: 0 auto; padding: 36px 20px 8px; display: flex; align-items: center; gap: 18px; }
.hero-icon { width: 56px; height: 56px; border-radius: 17px; }
.hero-icon .ic { width: 30px; height: 30px; }
.hero-text { flex: 1; min-width: 0; }
.page-hero h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.25; }
.page-hero p { color: var(--ink-soft); font-size: 0.98rem; margin-top: 3px; }
.hero-sub { color: var(--ink-mute); font-size: 0.86rem; margin-top: 4px; }
.hero-sub:empty { display: none; }
.hero-actions { flex-shrink: 0; }
.ghost-btn { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 0.88rem;
  font-weight: 700; color: var(--ink-soft); cursor: pointer; box-shadow: var(--shadow-sm); transition: all .12s; }
.ghost-btn:hover { border-color: var(--cobalt-200); color: var(--cobalt-deep); background: var(--cobalt-50); }

.container { max-width: var(--container); margin: 0 auto; padding: 20px 20px 56px; }

/* ── 홈 ── */
.home-hero { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(900px 380px at 88% -8%, rgba(120,170,255,.55), transparent 62%),
              radial-gradient(700px 300px at -5% 110%, rgba(40,200,220,.28), transparent 60%),
              linear-gradient(135deg, #2B4BDC 0%, #1D32A6 55%, #16277F 100%); }
.home-hero-in { max-width: var(--container); margin: 0 auto; padding: 60px 20px 108px; }
.home-hero .eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 0.84rem; font-weight: 700;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px 13px; }
.home-hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.22; margin: 18px 0 12px; }
.home-hero p { font-size: 1.04rem; opacity: 0.9; max-width: 36em; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; min-height: 36px; }
.hero-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 0.88rem; font-weight: 600; color: #fff; text-decoration: none;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 7px 13px; transition: background .12s; }
a.hero-chip:hover { background: rgba(255,255,255,.22); }
.hero-chip b { font-weight: 800; }
.home-hero .wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 48px; display: block; color: var(--bg); }
.home-main { margin-top: -64px; position: relative; }

.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.entry { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; min-height: 196px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s, border-color .16s; }
.entry:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--cobalt-200); }
.entry .e-icon { margin-bottom: 14px; }
.entry .e-title { font-size: 1.16rem; font-weight: 800; letter-spacing: -0.03em; }
.entry .e-desc { font-size: 0.92rem; color: var(--ink-soft); }
.entry .e-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entry .e-meta { font-size: 0.85rem; color: var(--ink-mute); font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.entry .e-open { display: inline-flex; align-items: center; color: var(--danger); background: var(--danger-soft);
  font-weight: 700; font-size: 0.78rem; border-radius: 999px; padding: 2px 10px; }
.entry .e-arrow { width: 34px; height: 34px; border-radius: 50%; background: var(--chip); color: var(--ink-soft);
  display: grid; place-items: center; flex-shrink: 0; transition: background .16s, color .16s; }
.entry:hover .e-arrow { background: var(--cobalt); color: #fff; }

/* ── 검색 ── */
.searchbar { display: flex; gap: 8px; margin: 8px 0 18px; }
.searchbar input { flex: 1; min-width: 0; height: 50px; border: 1px solid var(--line); border-radius: 14px; padding: 0 16px 0 46px;
  font-size: 1rem; outline: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238F95A8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E") no-repeat 16px center / 20px; }
.searchbar input::placeholder { color: var(--ink-faint); }
.searchbar input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-100); }
.searchbar button { color: #fff; border: none; border-radius: 14px; height: 50px; padding: 0 24px; font-size: 0.98rem; cursor: pointer;
  font-weight: 700; background: var(--cobalt); transition: background .12s; flex-shrink: 0; }
.searchbar button:hover { background: var(--cobalt-strong) !important; }
.btn-policy, .btn-benefit { background: var(--cobalt); }

.section-title { font-size: 1.16rem; font-weight: 800; margin: 30px 0 14px; letter-spacing: -0.03em; }
.back-btn { background: none; border: none; color: var(--cobalt); cursor: pointer; font-size: 0.93rem; margin: 4px 0 -8px; display: none;
  font-weight: 700; padding: 6px 10px 6px 0; }
.back-btn:hover { color: var(--cobalt-deep); }

/* ── 선택 카드 (생애주기/분야) ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.pick-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 14px 18px; text-align: center;
  cursor: pointer; font-size: 1.02rem; font-weight: 700; letter-spacing: -0.02em; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.pick-card:hover { border-color: var(--cobalt-200); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pick-card .icon { margin: 0 auto 12px; }
.pick-card .count { display: block; font-size: 0.8rem; color: var(--ink-soft); font-weight: 500; margin-top: 4px; }
.pick-card .sub { display: block; font-size: 0.74rem; color: var(--ink-mute); font-weight: 500; margin-top: 2px; }
.pick-card .open { display: inline-flex; align-items: center; margin-top: 8px; font-size: 0.72rem; font-weight: 700; color: var(--danger);
  background: var(--danger-soft); border-radius: 999px; padding: 2px 10px; }

/* ── 필터 — 알약형 ── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.filter-btn { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 0.9rem;
  transition: all .12s; color: var(--ink-soft); font-weight: 600; }
.filter-btn:hover { border-color: var(--cobalt-200); background: var(--cobalt-50); color: var(--cobalt-deep); }
.filter-btn.active, .filter-btn.active.fp, .filter-btn.active.fb { background: var(--cobalt); border-color: var(--cobalt); color: #fff; font-weight: 700; }
.open-toggle { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 0.86rem; color: var(--ink-soft); cursor: pointer;
  user-select: none; font-weight: 600; }
.open-toggle input { accent-color: var(--cobalt); width: 16px; height: 16px; }
.open-toggle .live-dot { margin-right: 0; }

/* ── 카드 목록 — 넓은 화면에서는 2열 ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; }
.cards > .empty { grid-column: 1 / -1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { border-color: var(--cobalt-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.badge-row { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; background: var(--cobalt-100); color: var(--cobalt-ink); font-size: 0.75rem; font-weight: 700;
  padding: 3px 9px; border-radius: 7px; }
.badge.live { background: var(--danger-soft); color: var(--danger); }
.badge.new { background: var(--cobalt); color: #fff; }
.badge.changed { background: #FBEEDA; color: #8F5F12; }
.badge.field { background: var(--cobalt-100); color: var(--cobalt-ink); }
.badge.edition { background: var(--chip); color: var(--ink-mute); }
.badge.sec-policy { background: var(--cobalt-100); color: var(--cobalt-deep); }
.badge.sec-benefit { background: #E7EEFA; color: #2A5A9A; }
.card h3 { font-size: 1.1rem; margin-bottom: 6px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.4; }
.card .summary { color: var(--ink-soft); font-size: 0.93rem; margin-bottom: 12px; }
.card .amount, .card .key { display: flex; gap: 7px; align-items: flex-start; font-weight: 700; font-size: 0.9rem;
  background: var(--cobalt-50); border-radius: 10px; padding: 9px 12px; color: var(--cobalt-deep); }
.card .amount .ic, .card .key .ic { margin-top: 0.2em; }
/* 정보 줄 — 아이콘+글자 묶음(.m)을 나열 */
.meta-line { color: var(--ink-mute); font-size: 0.83rem; margin-top: 10px; font-weight: 500; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.m { display: inline-flex; align-items: center; gap: 5px; }

/* ── 모달 ── */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(15,18,30,.52); z-index: 2000; padding: 20px; overflow-y: auto;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-bg.show { display: flex; align-items: flex-start; justify-content: center; }
.modal { background: var(--card); border-radius: 22px; max-width: 640px; width: 100%; margin-top: 6vh; padding: 30px; position: relative;
  box-shadow: 0 30px 70px -30px rgba(15,18,30,.6); animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px); } }
.modal .close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--chip);
  display: grid; place-items: center; font-size: 1.35rem; cursor: pointer; color: var(--ink-soft); line-height: 1; transition: background .12s; }
.modal .close:hover { background: var(--cobalt-100); color: var(--cobalt-deep); }
.modal h2 { font-size: 1.36rem; margin-bottom: 10px; padding-right: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.35; }
.modal .mbadges { margin-bottom: 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.detail-row { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.detail-row .label { font-size: 0.8rem; color: var(--ink-mute); font-weight: 700; padding-top: 2px; }
.detail-row .value { font-size: 0.96rem; min-width: 0; overflow-wrap: anywhere; }
.detail-row .value a { color: var(--cobalt); font-weight: 600; }

.ann-box { background: #FFF8F7; border: 1px solid #F8D9D6; border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; }
.ann-box .ann-head { display: flex; align-items: center; font-size: 0.9rem; font-weight: 800; color: var(--danger); margin-bottom: 8px; }
.ann-item { display: block; padding: 9px 0; border-top: 1px dashed #F3D3D0; }
.ann-item:first-of-type { border-top: none; }
.ann-item a { color: var(--ink); font-weight: 700; font-size: 0.93rem; text-decoration: none; }
.ann-item a:hover { color: var(--cobalt); text-decoration: underline; }
.ann-item .ann-meta { font-size: 0.78rem; color: var(--ink-mute); margin-top: 2px; }

.empty { text-align: center; color: var(--ink-mute); padding: 48px 0; }
.notice { font-size: 0.82rem; color: var(--ink-mute); text-align: center; margin: 44px auto 0; line-height: 1.7; max-width: 46em; }

/* ── 판(edition) 탭 — 구간 선택형 ── */
.ed-tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; margin: 0 0 6px; background: var(--chip); border-radius: 14px; padding: 4px; }
.ed-tabs:empty { display: none; }
.ed-tab { background: none; border: none; color: var(--ink-soft); border-radius: 10px; padding: 8px 16px; cursor: pointer; font-size: 0.9rem;
  font-weight: 700; transition: all .12s; }
.ed-tab:hover { color: var(--ink); }
.ed-tab.active { background: var(--card); color: var(--cobalt-deep); box-shadow: var(--shadow-sm); }
.ed-tab .et-count { font-weight: 600; opacity: 0.7; font-size: 0.8rem; margin-left: 5px; }

/* ── 바닥글 (site.js가 넣는다) ── */
.site-footer { border-top: 1px solid var(--line); background: var(--card); }
.footer-in { max-width: var(--container); margin: 0 auto; padding: 28px 20px 36px; display: flex; flex-wrap: wrap; gap: 10px 28px;
  align-items: center; justify-content: space-between; }
.footer-brand { font-weight: 800; letter-spacing: -0.03em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.86rem; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--cobalt); }
.footer-note { flex-basis: 100%; font-size: 0.8rem; color: var(--ink-mute); line-height: 1.6; }

/* ── 좁은 화면 ── */
@media (max-width: 900px) {
  .entries { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .topnav-in { height: 54px; gap: 10px; padding: 0 0 0 14px; }
  .brand-name { display: none; }                 /* 한 줄에 로고 표식 + 가로로 미는 메뉴 */
  .navlinks { padding-right: 14px; }
  .nav-link { padding: 7px 11px; font-size: 0.9rem; }
  .hero-in { padding: 24px 16px 4px; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
  .hero-icon { width: 46px; height: 46px; border-radius: 14px; }
  .hero-icon .ic { width: 25px; height: 25px; }
  .hero-text { flex-basis: 0; }
  .page-hero h1 { font-size: 1.4rem; }
  .page-hero p { font-size: 0.92rem; }
  .container { padding: 16px 16px 44px; }
  .home-hero-in { padding: 40px 18px 92px; }
  .home-main { margin-top: -56px; }
  .modal { padding: 24px 20px; margin-top: 3vh; border-radius: 20px; }
  .detail-row { grid-template-columns: 1fr; gap: 3px; }
  .open-toggle { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 600px) {
  .entries { grid-template-columns: 1fr; gap: 12px; }
  .entry { flex-direction: row; align-items: center; gap: 16px; min-height: 0; padding: 18px; flex-wrap: wrap; }
  .entry .e-icon { margin-bottom: 0; }
  .entry .e-body { flex: 1; min-width: 0; }
  .entry .e-foot { margin-top: 0; padding-top: 0; flex-basis: 100%; padding-left: 62px; }
  .entry .e-arrow { display: none; }
  .searchbar button { padding: 0 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
