/* ============================================================
 * ScholarGlobe 스타일
 * 에디토리얼 타이포그래피 × 픽셀 레트로, 퍼플 단일 액센트,
 * 샤프(라운드 없음) 시스템 + 하드 오프셋 섀도
 * ============================================================ */

:root {
  --bg: #f6f4ef;
  --surface: #fffdf9;
  --ink: #221436;
  --ink-2: #5f5477;
  --ink-3: #8b80a0;
  --line: #221436;
  --accent: #6d28d9;
  --accent-strong: #5b21b6;
  --accent-deep: #2a0a5e;
  --accent-soft: #efe9fb;
  --accent-mid: #a78bfa;
  --good: #0b6b45;
  --good-bg: #e2f3ea;
  --warn: #8a5200;
  --warn-bg: #fbeed8;
  --bad: #a93028;
  --bad-bg: #fbe7e4;
  --sans: 'Archivo', 'Pretendard Variable', Pretendard, -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --maxw: 1180px;
}

/* 언어별 폰트 스택 (CJK/Thai 시스템 폰트) */
html[lang="en"] { --sans: 'Archivo', 'Pretendard Variable', -apple-system, 'Segoe UI', sans-serif; }
html[lang="ja"] { --sans: 'Archivo', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', 'Pretendard Variable', sans-serif; }
html[lang="zh"] { --sans: 'Archivo', 'Microsoft YaHei', 'PingFang SC', 'Pretendard Variable', sans-serif; }
html[lang="th"] { --sans: 'Leelawadee UI', 'Noto Sans Thai', Tahoma, 'Segoe UI', sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html { word-break: keep-all; }
/* 한국어(ko)만 keep-all, 그 외 언어는 기준 줄바꿈 */
html[lang="en"], html[lang="ja"], html[lang="zh"], html[lang="th"] { word-break: normal; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(109, 40, 217, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 40, 217, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--accent-strong); }
button { font-family: inherit; }
img, svg { vertical-align: middle; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

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

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------------- 상단 내비게이션 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 90;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
}
.topbar-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.top-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lang-switch {
  display: flex; align-items: center; gap: 7px;
  border: 2px solid var(--line); background: var(--surface);
  padding: 0 8px 0 11px; height: 38px; box-shadow: var(--shadow-sm);
  position: relative; flex: none;
}
.lang-switch > svg { color: var(--accent); flex: none; }
.lang-switch::after {
  content: ''; position: absolute; right: 9px; top: 50%; margin-top: -2px;
  width: 6px; height: 6px; pointer-events: none;
  background: linear-gradient(45deg, transparent 46%, var(--ink) 46%, var(--ink) 54%, transparent 54%);
  transform: rotate(45deg);
}
.lang-switch select {
  width: auto; border: 0; padding: 6px 22px 6px 0; background: transparent;
  font-family: var(--sans); font-weight: 700; font-size: 13.5px; color: var(--ink);
  appearance: none; cursor: pointer;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 19px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand .brand-globe {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--accent-deep); color: #fff;
  box-shadow: 3px 3px 0 var(--accent);
}
.brand em { font-style: normal; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 13px; font-size: 14.5px; font-weight: 700;
  color: var(--ink-2); text-decoration: none; border: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); border-color: var(--line); background: var(--surface); }
.nav a.active { color: #fff; background: var(--accent); border-color: var(--accent-deep); box-shadow: var(--shadow-sm); }
.nav a svg { flex: none; }

/* ---------------- 버튼 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border: 2px solid var(--ink);
  font-size: 15.5px; font-weight: 800; text-decoration: none; cursor: pointer;
  background: var(--surface); color: var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent-deep); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { box-shadow: none; border-color: var(--ink-3); }
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; background: var(--surface); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; }
.btn-lg { padding: 16px 28px; font-size: 17px; }

/* ---------------- 공통 섹션 ---------------- */
.app { min-height: 60vh; }
.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; }
.section-head p { margin-top: 12px; color: var(--ink-2); font-size: 16.5px; }

.mono { font-family: var(--mono); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-strong);
}

/* ---------------- 히어로 ---------------- */
.hero { padding: 64px 0 56px; border-bottom: 2px solid var(--line); overflow: hidden; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center; }
.hero h1 {
  font-size: clamp(38px, 6vw, 66px); font-weight: 900; letter-spacing: -0.03em;
}
.hero h1 .hl { color: var(--accent); position: relative; white-space: nowrap; }
.hero h1 .hl::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 6px;
  height: 12px; background: var(--accent-soft); z-index: -1;
}
.hero-sub { margin-top: 18px; font-size: 17.5px; color: var(--ink-2); max-width: 54ch; }
.hero-cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art {
  display: grid; place-items: center; gap: 14px;
  border: 2px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow); padding: 26px 20px;
  justify-self: end; width: 100%;
}
.hero-art .art-globe { color: var(--accent-deep); }
.hero-art .art-caption {
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  letter-spacing: 0.06em; text-align: center;
}
.flag-strip {
  margin-top: 44px; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
}
.flag-item { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.flag-item .px-flag { border: 1.5px solid var(--line); }

/* ---------------- 진행 3단계 ---------------- */
.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}.step { padding: 30px 28px 34px; }
.step + .step { border-left: 2px solid var(--line); }
.step-num {
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent-strong);
  display: inline-block; border: 2px solid var(--accent); padding: 2px 10px; margin-bottom: 18px;
  background: var(--accent-soft);
}
.step h3 { font-size: 21px; font-weight: 800; }
.step p { margin-top: 10px; color: var(--ink-2); font-size: 15px; }

/* ---------------- 특징 타일 ---------------- */
.tiles { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.tile { border: 2px solid var(--line); padding: 30px; box-shadow: var(--shadow-sm); background: var(--surface); }
.tile svg { color: var(--accent); }
.tile h3 { margin-top: 16px; font-size: 20px; font-weight: 800; }
.tile p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.tile-purple { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.tile-purple svg { color: var(--accent-mid); }
.tile-purple p { color: #cfc3ee; }
.tile-ink { background: var(--ink); color: #fff; }
.tile-ink svg { color: var(--accent-mid); }
.tile-ink p { color: #b9aecf; }

/* ---------------- 근거 설명 ---------------- */
.evidence-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 44px; align-items: start; }
.evidence-split > div, .hero-grid > div { min-width: 0; }
.evidence-note { margin-top: 20px; padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); font-size: 14px; color: var(--ink-2); }
.demo-table { border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: 13.5px; overflow-x: auto; }
.demo-table table { width: 100%; border-collapse: collapse; }
.demo-table th, .demo-table td { padding: 10px 14px; text-align: left; border-bottom: 1.5px solid var(--line); }
.demo-table th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-deep); }
.demo-table tr:last-child td { border-bottom: 0; }
.demo-table .pass { color: var(--good); font-weight: 700; }
.demo-table .fail { color: var(--bad); font-weight: 700; }
.demo-table-cap { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

/* ---------------- CTA 밴드 ---------------- */
.cta-band { background: var(--accent-deep); color: #fff; border-top: 2px solid var(--line); padding: 64px 0; }
.cta-band-in { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 900; letter-spacing: -0.02em; }
.cta-band p { margin-top: 10px; color: #cfc3ee; font-size: 16px; }
.cta-band .btn { box-shadow: 5px 5px 0 var(--accent); border-color: var(--accent); }
.cta-band .btn:hover { box-shadow: 6px 6px 0 var(--accent-mid); }

/* ---------------- 푸터 ---------------- */
.footer { background: var(--ink); color: #b9aecf; padding: 40px 0 48px; border-top: 2px solid var(--line); }
.footer-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer .brand { color: #fff; }
.footer .brand .brand-globe { box-shadow: 3px 3px 0 var(--accent-strong); }
.footer p { font-size: 13px; max-width: 60ch; margin-top: 12px; }
.footer-meta { font-family: var(--mono); font-size: 12px; color: #8b80a0; text-align: right; }

/* ---------------- 위저드 ---------------- */
.wizard { padding: 48px 0 80px; }
.wizard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.wizard-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; }
.wizard-head p { margin-top: 8px; color: var(--ink-2); }

.wiz-progress { display: flex; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.wiz-step-chip {
  flex: 1; min-width: 130px; display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border: 2px solid var(--ink-3); color: var(--ink-3);
  font-family: var(--mono); font-size: 12px; font-weight: 600; background: var(--surface);
}
.wiz-step-chip.now { border-color: var(--line); color: var(--ink); background: var(--accent-soft); box-shadow: var(--shadow-sm); }
.wiz-step-chip.done { border-color: var(--line); color: var(--accent-strong); background: var(--surface); }
.wiz-step-chip .chip-idx { font-size: 14px; }

.wiz-card { border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow); padding: 38px; }
.wiz-qtitle { font-size: 23px; font-weight: 800; }
.wiz-qdesc { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.wiz-fieldset { margin-top: 30px; }
.wiz-label { display: block; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.wiz-label .opt { color: var(--ink-3); font-weight: 600; font-size: 12.5px; margin-left: 6px; }
.wiz-help { font-size: 13px; color: var(--ink-2); margin: -4px 0 10px; }

input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--line);
  background: #fff; color: var(--ink); font-family: var(--mono); font-size: 15px;
  border-radius: 0; appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
  font-family: var(--sans); font-weight: 600;
}
input:focus, select:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 20px; }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }

/* 선택 카드 (라디오) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.choice {
  position: relative; display: block; cursor: pointer;
  border: 2px solid var(--ink-3); background: #fff; padding: 14px 16px;
  transition: transform 0.1s ease;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .c-title { font-weight: 800; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.choice .c-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; font-family: var(--mono); }
.choice:hover { border-color: var(--ink); }
.choice:has(input:checked) { border-color: var(--accent-deep); background: var(--accent-soft); box-shadow: var(--shadow-sm); }
.choice:has(input:checked) .c-title { color: var(--accent-deep); }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.wiz-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; }
.wiz-warn { margin-top: 16px; color: var(--bad); font-weight: 700; font-size: 14px; }

/* ---------------- 결과 ---------------- */
.results-head { padding: 48px 0 24px; border-bottom: 2px solid var(--line); }
.results-head h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; }
.results-head .sub { margin-top: 10px; color: var(--ink-2); }
.profile-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.p-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border: 2px solid var(--line); background: var(--surface);
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
}
.p-chip svg { color: var(--accent); }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 36px 0; }
.stat {
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.stat .num { font-family: var(--mono); font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.03em; }
.stat .lbl { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); font-weight: 700; }
.stat-purple { background: var(--accent-deep); border-color: var(--accent-deep); }
.stat-purple .num { color: var(--accent-mid); }
.stat-purple .lbl { color: #cfc3ee; }

.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.f-chip {
  padding: 8px 14px; border: 2px solid var(--ink-3); background: var(--surface);
  font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.f-chip:hover { border-color: var(--ink); color: var(--ink); }
.f-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: var(--shadow-sm); }
.f-select { width: auto; min-width: 150px; }

.sch-card {
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  padding: 24px 26px; margin-bottom: 18px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sch-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.sch-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.sch-title { display: flex; align-items: center; gap: 12px; }
.sch-title .px-flag { border: 1.5px solid var(--line); flex: none; }
.sch-name { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.sch-provider { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.sch-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border: 2px solid var(--line); font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  background: var(--surface); color: var(--ink);
}
.badge svg { width: 12px; height: 12px; }
.badge-tier-SAFETY { background: var(--good-bg); color: var(--good); border-color: var(--good); }
.badge-tier-TARGET { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-strong); }
.badge-tier-REACH { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.badge-bond { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.badge-fund { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }

.sch-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; margin-top: 16px; }
.sch-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); }
.sch-meta b { color: var(--ink); font-weight: 700; }
.sch-meta .m { display: inline-flex; align-items: center; gap: 6px; }
.sch-meta svg { color: var(--accent); flex: none; }
.sch-score { text-align: right; }
.sch-score .score-num { font-family: var(--mono); font-size: 34px; font-weight: 600; color: var(--accent-deep); line-height: 1; }
.sch-score .score-lbl { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.1em; }
.sch-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.bond-alert {
  margin-top: 14px; display: flex; gap: 10px; align-items: flex-start;
  border: 2px dashed var(--warn); background: var(--warn-bg); padding: 10px 14px;
  font-size: 13.5px; color: var(--warn); font-weight: 600;
}
.bond-alert svg { flex: none; margin-top: 2px; }

.excluded-box { margin: 34px 0 70px; }
.excluded-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  padding: 16px 20px; font-size: 15.5px; font-weight: 800; cursor: pointer;
}
.excluded-list { margin-top: 14px; border: 2px solid var(--ink-3); background: var(--surface); }
.excluded-item { display: flex; gap: 12px; align-items: baseline; padding: 12px 18px; font-size: 14px; border-bottom: 1.5px solid var(--line); }
.excluded-item:last-child { border-bottom: 0; }
.excluded-item .nm { font-weight: 800; white-space: nowrap; }
.excluded-item .rs { color: var(--ink-2); }

/* ---------------- 탐색 ---------------- */
.explore-head { padding: 48px 0 28px; }
.explore-head h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; }
.explore-head p { margin-top: 10px; color: var(--ink-2); max-width: 60ch; }
.explore-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-bottom: 70px; }
.explore-grid-empty { grid-template-columns: 1fr; }
.explore-grid .sch-card { margin-bottom: 0; }
.explore-grid .sch-body { grid-template-columns: 1fr; }
.explore-grid .sch-score { text-align: left; }

/* ---------------- 드로어 (근거) ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 120; background: rgba(34, 20, 54, 0.55);
  display: grid; grid-template-columns: minmax(320px, 560px) 1fr;
}
.drawer {
  background: var(--bg); border-right: 2px solid var(--line);
  height: 100%; overflow-y: auto; padding: 30px 30px 50px;
  animation: drawer-in 0.22s ease;
}
@keyframes drawer-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-close { position: sticky; top: 0; float: right; margin-bottom: 10px; }
.drawer h2 { font-size: 23px; font-weight: 900; padding-right: 60px; }
.drawer .d-provider { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.d-row { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.d-section-lbl {
  margin-top: 30px; font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-strong);
  display: flex; align-items: center; gap: 8px;
}
.d-section-lbl::after { content: ''; flex: 1; height: 2px; background: var(--line); }
.ev-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 2px solid var(--line); font-size: 13px; display: block; overflow-x: auto; }
.ev-table td, .ev-table th { display: table-cell; }
.ev-table th, .ev-table td { padding: 9px 12px; border-bottom: 1.5px solid var(--line); text-align: left; vertical-align: top; }
.ev-table th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent-soft); color: var(--accent-deep); white-space: nowrap; }
.ev-table tr:last-child td { border-bottom: 0; }
.ev-table .ok { color: var(--good); font-weight: 700; white-space: nowrap; }
.ev-table .no { color: var(--bad); font-weight: 700; white-space: nowrap; }
.ev-table td.note { color: var(--ink-2); font-size: 12px; }
.dq-list { margin: 14px 0 0; padding: 0; list-style: none; }
.dq-list li { display: flex; gap: 9px; padding: 9px 12px; border: 2px solid var(--bad); background: var(--bad-bg); color: var(--bad); font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.dq-list li svg { flex: none; }
.d-quote {
  margin-top: 14px; border: 2px solid var(--line); border-left: 6px solid var(--accent);
  background: var(--surface); padding: 16px 18px; font-size: 13.5px; color: var(--ink-2);
}
.d-source { margin-top: 12px; font-size: 13px; }
.d-source a { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.d-verified { margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

/* ---------------- 빈 상태 ---------------- */
.empty {
  border: 2px dashed var(--ink-3); background: var(--surface);
  padding: 60px 30px; text-align: center; margin: 50px 0 70px;
}
.empty svg { color: var(--accent); }
.empty h2 { margin-top: 18px; font-size: 22px; font-weight: 800; }
.empty p { margin-top: 10px; color: var(--ink-2); }
.empty .btn { margin-top: 22px; }

/* ---------------- 실시간 검색 ---------------- */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm); padding: 0 8px 0 14px;
  margin-top: 22px; min-height: 52px;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.searchbar:focus-within { border-color: var(--accent-deep); box-shadow: 5px 5px 0 var(--accent); }
.searchbar > svg { color: var(--accent); flex: none; }
.searchbar input {
  width: 100%; border: 0; background: transparent; padding: 12px 0;
  font-family: var(--sans); font-weight: 600; font-size: 15.5px; color: var(--ink);
}
.searchbar input:focus { outline: none; }
.searchbar input::placeholder { color: var(--ink-3); font-weight: 500; }
.searchbar .q-clear {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  border: 2px solid var(--ink-3); background: var(--surface); color: var(--ink-2);
  cursor: pointer;
}
.searchbar .q-clear:hover { border-color: var(--ink); color: var(--ink); }
.searchbar-sm { min-height: 46px; margin-top: 0; flex: 1 1 260px; }
.searchbar-sm input { font-size: 14.5px; padding: 10px 0; }
mark.hit { background: var(--accent-soft); color: var(--accent-deep); padding: 0 1px; font-weight: 800; }
.search-meta { margin: 14px 0 20px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.results-toolbar .f-select { flex: 0 0 auto; }

/* ---------------- 출처 수집 패널 ---------------- */
.collect-panel {
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  padding: 24px 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px; align-items: center;
}
.cp-head { display: flex; align-items: center; gap: 10px; }
.cp-head svg { color: var(--accent); flex: none; }
.cp-head h3 { font-size: 17.5px; font-weight: 800; }
.cp-desc { margin-top: 6px; font-size: 14px; color: var(--ink-2); max-width: 70ch; }
.cp-stats { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
#cp-run:disabled { opacity: 0.6; cursor: wait; }

/* ---------------- 등장 애니메이션 ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .view { animation: view-in 0.3s ease; }
  @keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------------- 모바일 하단 탭 ---------------- */
.tabbar { display: none; }

/* ---------------- 반응형 ---------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { justify-self: stretch; max-width: 420px; }
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile-purple { grid-column: 1 / -1; }
  .evidence-split { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step + .step { border-left: 0; border-top: 2px solid var(--line); }
  .explore-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .topbar { border-bottom-width: 2px; }
  .topbar-in { height: 58px; padding: 0 18px; }
  .nav { display: none; }
  .brand { font-size: 17px; }

  .tabbar {
    display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 95;
    background: var(--surface); border-top: 2px solid var(--line);
    display: flex;
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 9px 4px 10px; font-size: 10.5px; font-weight: 700; color: var(--ink-2);
    text-decoration: none;
  }
  .tabbar a.active { color: var(--accent-strong); background: var(--accent-soft); }
  body { padding-bottom: 66px; }
  .footer { padding-bottom: 90px; }

  .wrap { padding: 0 18px; }
  .section { padding: 52px 0; }
  .hero { padding: 40px 0 44px; }
  .hero h1 { font-size: clamp(32px, 9.4vw, 44px); }
  .hero h1 .hl::after { height: 8px; bottom: 4px; }
  .hero-sub { font-size: 15.5px; }
  .btn { padding: 12px 18px; font-size: 14.5px; }

  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile-purple { grid-column: auto; }

  .field-grid { grid-template-columns: 1fr; }
  .wiz-card { padding: 24px 20px; }
  .wiz-nav { flex-direction: column-reverse; }
  .wiz-nav .btn { width: 100%; }

  .stat-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .collect-panel { grid-template-columns: 1fr; }
  .stat { padding: 16px; }
  .sch-card { padding: 18px 16px; }
  .sch-body { grid-template-columns: 1fr; }
  .sch-score { text-align: left; }
  .results-toolbar { flex-direction: column; align-items: stretch; }
  .f-select { width: 100%; }

  .overlay { grid-template-columns: 1fr; }
  .drawer { padding: 22px 18px 40px; }
}

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