/* ==========================================================================
   univcheck.com — 공통 스타일 (2026-11)
   정적 사이트: 외부 프레임워크·폰트 CDN 없이 동작
   ========================================================================== */

:root {
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --brand: #1b3a6b;
  --brand-2: #2c5aa0;
  --brand-soft: #eef3fb;
  --accent: #f5a524;
  --accent-soft: #fff5e0;
  --green: #067647;
  --green-soft: #ecfdf3;
  --red: #b42318;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic",
          "Noto Sans KR", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans",
          -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

img { max-width: 100%; }

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(820px, 100% - 40px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 1.05rem; font-weight: 800;
  letter-spacing: -.04em;
}
.brand-name { font-size: 1.2rem; }
.brand-name em { color: var(--brand-2); font-style: normal; }
.brand-sub { font-size: .72rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; display: block; margin-top: -4px; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--ink-2); font-size: .92rem; font-weight: 600;
  padding: 8px 10px; border-radius: 8px;
}
.site-nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.nav-lang {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 12px !important; font-size: .84rem !important;
}
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(680px 300px at 92% -18%, rgba(245, 165, 36, .22), transparent 65%),
    radial-gradient(900px 500px at 0% 110%, rgba(44, 90, 160, .7), transparent 65%),
    linear-gradient(140deg, #12294f 0%, #1b3a6b 55%, #24497f 100%);
  padding: 64px 0 72px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 75%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  color: #e8eefb; margin-bottom: 20px;
}
.hero h1 { color: #fff; max-width: 18em; }
.hero h1 .hl { color: var(--accent); }
.hero-lead { color: #c9d6ea; font-size: 1.06rem; max-width: 44em; margin-bottom: 28px; }

.search-box { position: relative; max-width: 620px; }
.search-field {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px; padding: 6px 6px 6px 16px;
  box-shadow: 0 12px 30px rgba(3, 12, 30, .28);
}
.search-field svg { flex: none; color: var(--muted); }
.search-field input[type="search"] {
  flex: 1; border: 0; outline: 0; box-shadow: none; font: inherit; font-size: 1rem;
  padding: 12px 0; color: var(--ink); background: transparent; min-width: 0; width: auto;
}
.search-field input[type="search"]:focus { border: 0; box-shadow: none; }
.search-field .btn { flex: none; }
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; display: none;
}
.suggest.open { display: block; }
.suggest button {
  display: flex; justify-content: space-between; gap: 12px; width: 100%;
  border: 0; background: none; text-align: left; font: inherit; cursor: pointer;
  padding: 11px 16px; color: var(--ink);
}
.suggest button:hover, .suggest button.active { background: var(--brand-soft); }
.suggest .s-meta { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.suggest .s-empty { padding: 14px 16px; color: var(--muted); font-size: .9rem; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-chips button {
  border: 1px solid rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .08);
  color: #e9f0fb; font: inherit; font-size: .85rem; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
}
.hero-chips button:hover { background: rgba(255, 255, 255, .18); }

/* ---------- generic ---------- */
.section { padding: 56px 0; }
.section.tight { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.section-head p { color: var(--muted); margin: 4px 0 0; max-width: 60ch; }
.eyebrow {
  display: inline-block; font-size: .76rem; font-weight: 800; letter-spacing: .1em;
  color: var(--brand-2); text-transform: uppercase; margin-bottom: 8px;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: clamp(18px, 3vw, 28px); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: 700; padding: 11px 18px; line-height: 1.2;
  background: var(--brand); color: #fff; white-space: nowrap;
}
.btn:hover { background: #16304f; text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--brand-soft); border-color: #b9c9e4; color: var(--brand); }
.btn-sm { padding: 7px 12px; font-size: .84rem; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- stat strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); margin-top: -36px; position: relative; z-index: 2;
}
.stat { padding: 20px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat-value small { font-size: .82rem; font-weight: 600; color: var(--muted); margin-left: 3px; }

/* ---------- calculator ---------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: .86rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
select, input[type="text"], input[type="number"], input[type="search"] {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 11px 12px; outline: none;
}
select:focus, input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(44, 90, 160, .13); }
input[type="range"] { width: 100%; accent-color: var(--brand); }

.seg { display: flex; gap: 6px; background: #eff2f6; padding: 4px; border-radius: 10px; }
.seg label { flex: 1; margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; font-size: .84rem; font-weight: 700;
  padding: 7px 6px; border-radius: 7px; color: var(--ink-2); cursor: pointer;
}
.seg input:checked + span { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 1px; }

.result {
  background: linear-gradient(160deg, #0f2649, #1b3a6b 70%);
  color: #fff; border-radius: var(--radius); padding: clamp(20px, 3vw, 30px);
  position: relative; overflow: hidden;
}
.result::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(245, 165, 36, .35), transparent 70%);
}
.result-label { font-size: .86rem; color: #b9c8e2; font-weight: 600; }
.result-big { font-size: clamp(2.1rem, 4.4vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; margin: 2px 0 2px; line-height: 1.15; }
.result-sub { color: #c9d6ea; font-size: .88rem; }
.result-rows { margin-top: 20px; border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 14px; position: relative; z-index: 1; }
.result-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: .92rem; color: #dbe5f5; }
.result-row b { color: #fff; font-variant-numeric: tabular-nums; }
.result-row.total { border-top: 1px dashed rgba(255, 255, 255, .25); margin-top: 6px; padding-top: 12px; font-weight: 700; }
.badge-ok {
  display: inline-block; background: rgba(6, 118, 71, .25); border: 1px solid rgba(122, 230, 175, .5);
  color: #b8f5d4; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.result-note { margin-top: 14px; font-size: .76rem; color: #a9bbd8; line-height: 1.5; position: relative; z-index: 1; }

/* ---------- filters + table ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 150px; flex: 1 1 150px; }
.filters .field.grow { flex: 2 1 220px; }
.filters .field label { font-size: .78rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
thead th {
  background: #f2f5f9; color: var(--ink-2);
  font-size: .78rem; font-weight: 700; text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
thead th button {
  border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
  padding: 0; display: inline-flex; align-items: center; gap: 4px;
}
thead th button:hover { color: var(--brand); }
thead th .arrow { font-size: .7rem; opacity: .55; }
thead th[aria-sort="ascending"] .arrow, thead th[aria-sort="descending"] .arrow { opacity: 1; color: var(--brand); }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fbfe; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.univ-name { font-weight: 700; color: var(--ink); }
.univ-name button { border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: pointer; padding: 0; text-align: left; }
.univ-name button:hover { color: var(--brand-2); text-decoration: underline; }
.tag {
  display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 5px;
  background: var(--brand-soft); color: var(--brand); vertical-align: 1px;
}
.tag.national { background: #e7f6ef; color: var(--green); }
.tag.public { background: #eef4e6; color: #4b6b17; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.compare-toggle {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 7px;
  font: inherit; font-size: .76rem; font-weight: 700; color: var(--ink-2);
  padding: 5px 9px; cursor: pointer; white-space: nowrap;
}
.compare-toggle:hover { border-color: var(--brand-2); color: var(--brand); }
.compare-toggle.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 4px 0; flex-wrap: wrap; }
.table-count { color: var(--muted); font-size: .86rem; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- compare ---------- */
.compare-grid { overflow-x: auto; }
.compare-table { min-width: 620px; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; color: var(--muted); font-weight: 600; width: 170px; }
.compare-table thead th { background: #fff; font-size: .9rem; color: var(--ink); border-bottom: 2px solid var(--line); position: static; }
.compare-table thead th .rm { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.compare-table td { text-align: right; font-variant-numeric: tabular-nums; }
.compare-empty { padding: 28px 4px; color: var(--muted); }

/* ---------- notes / callouts ---------- */
.callout {
  display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid #f7d9a0; font-size: .88rem; color: #6b4a09;
}
.callout.blue { background: var(--brand-soft); border-color: #cddcf3; color: #1c3a63; }
.callout .ico { flex: none; font-weight: 800; }
.callout p:last-child { margin-bottom: 0; }

.notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.notes .card { padding: 20px 22px; }
.notes h3 { font-size: 1rem; margin-bottom: 6px; }
.notes p, .notes li { font-size: .88rem; color: var(--ink-2); }
.notes ul { margin: 0; padding-left: 18px; }
.notes li { margin-bottom: 4px; }

/* ---------- CTA banner ---------- */
.cta {
  background: linear-gradient(120deg, #12294f, #1b3a6b);
  color: #fff; border-radius: 20px; padding: clamp(24px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { color: #c9d6ea; margin: 0; max-width: 52ch; }
.cta .btn { background: var(--accent); color: #33230a; }
.cta .btn:hover { background: #ffb733; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 20px; padding: 40px 0 32px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-brand p { font-size: .84rem; color: var(--muted); max-width: 40ch; }
.foot-col h4 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot-col a { display: block; font-size: .88rem; color: var(--ink-2); padding: 3px 0; }
.foot-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- prose pages ---------- */
.page-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.page-hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.page-hero p { color: var(--muted); max-width: 62ch; margin: 0; }
.prose { padding: 44px 0 64px; }
.prose h2 { font-size: 1.3rem; margin-top: 40px; padding-top: 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.05rem; margin-top: 24px; }
.prose p, .prose li { color: var(--ink-2); font-size: .95rem; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose table { margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.prose th, .prose td { padding: 9px 12px; font-size: .88rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: #f2f5f9; }
.prose .meta-box { background: var(--brand-soft); border: 1px solid #cddcf3; border-radius: var(--radius-sm); padding: 16px 18px; font-size: .88rem; color: #1c3a63; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 28px; }
.toc a { display: inline-block; margin: 3px 14px 3px 0; font-size: .88rem; }

/* ---------- EN page specifics ---------- */
.en .hero h1 { max-width: 22em; }
.en .stat-value { font-size: 1.3rem; }
.lang-note { font-size: .8rem; color: var(--muted); }

.essentials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.essential { padding: 22px; }
.essential .k { font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); }
.essential h3 { margin: 6px 0 8px; font-size: 1.02rem; }
.essential p { font-size: .9rem; color: var(--ink-2); margin-bottom: 10px; }
.essential ul { margin: 0 0 10px; padding-left: 18px; font-size: .88rem; color: var(--ink-2); }
.essential li { margin-bottom: 4px; }

.news-placeholder { border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #fbfcfe; padding: clamp(20px, 3vw, 30px); }
.news-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.news-slot { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; }
.news-slot .slot-tag { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.news-slot h4 { font-size: .95rem; margin: 8px 0 6px; color: var(--ink-2); }
.news-slot p { font-size: .82rem; color: var(--muted); margin: 0; }
.news-slot .badge { align-self: flex-start; font-size: .7rem; font-weight: 700; color: #8a5a00; background: var(--accent-soft); border: 1px solid #f7d9a0; padding: 2px 8px; border-radius: 999px; }

/* ---------- 404 ---------- */
.center-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .calc-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .notes { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .news-slots { grid-template-columns: 1fr; }
  .essentials { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px;
    flex-direction: column; align-items: stretch; gap: 2px;
  }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--line-strong);
    border-radius: 10px; background: #fff; cursor: pointer; font-size: 1.1rem;
  }
  .hero { padding: 44px 0 60px; }
  .hero h1 { font-size: 1.9rem; }
  .search-field { flex-wrap: wrap; padding: 10px 12px; }
  .search-field input { flex-basis: 100%; padding: 4px 0 10px; }
  .search-field .btn { width: 100%; }
  .section { padding: 40px 0; }
  .stat { padding: 16px; }
  .stat-value { font-size: 1.2rem; }
  thead th, tbody td { padding: 9px 10px; }
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
  .update-tag { display: none; }
}

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