/* 연구소 공개 홈페이지 (app/site/build.py, templates/site/) — 허브 app.css와 따로 */
:root {
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --text: #1B1F24;
  --muted: #5D6570;
  --line: #E3E1DA;
  --accent: #1F5C4A;
  --accent-strong: #154236;
  --accent-soft: #E6F0EC;
  --band: #F2EFE7;
  --warn-bg: #FFF4D6;
  --warn-fg: #7A5300;
  --radius: 12px;
  --wrap: 1040px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171A;
    --surface: #1C2024;
    --text: #E9ECEF;
    --muted: #A2AAB3;
    --line: #2D3338;
    --accent: #7CC4AA;
    --accent-strong: #A3D9C5;
    --accent-soft: #1F3029;
    --band: #1A1E21;
    --warn-bg: #3A2F12;
    --warn-fg: #F2CF7A;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 "IBM Plex Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

.muted { color: var(--muted); }

.preview-bar {
  padding: 8px 16px;
  background: var(--warn-bg);
  color: var(--warn-fg);
  font-size: 14px;
  text-align: center;
}

.preview-bar a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}

.logo-en {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  max-width: 760px;
  margin: 8px 0 16px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.3;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
}

.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--surface); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }

.section { padding: 48px 16px; }
.page-top { padding-top: 56px; }

h1 { line-height: 1.3; }
h2 { margin: 40px 0 12px; font-size: 22px; }
.section > h2:first-child { margin-top: 0; }
h3 { margin: 0 0 8px; font-size: 17px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.cards.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card p { margin: 0; color: var(--muted); }
.program-card h3 a { color: var(--text); text-decoration: none; }
.program-card h3 a:hover { color: var(--accent); }
.program-card .eyebrow { margin-bottom: 6px; }

.tag-preview {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-fg);
  font-weight: 600;
}

.checklist { padding-left: 1.2em; }
.checklist li { margin: 6px 0; }

.steps { padding-left: 1.4em; }
.steps li { margin: 8px 0; }

.band {
  margin-top: 32px;
  padding: 28px;
  background: var(--band);
  border-radius: var(--radius);
}

.section.band { margin: 48px auto; max-width: calc(var(--wrap) - 32px); }

.empty {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.crumb { margin: 0; color: var(--muted); font-size: 14px; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0 8px;
}

.facts div {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.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: 15px; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child, td:nth-child(2) { white-space: nowrap; }

.contact .btn { font-size: 17px; }

.site-footer {
  margin-top: 40px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer-inner p { margin: 4px 0; }
