:root {
  --ink: #1a1d24;
  --ink-soft: #454b56;
  --muted: #6b7280;
  --line: #e6e8ec;
  --bg: #fbfbfa;
  --panel: #ffffff;
  --accent: #1f3a5f;
  --accent-2: #2b5489;
  --neg: #b5443a;
  --pos: #2f7d5b;
  --zone-neg: #f7e7e4;
  --zone-pos: #e7f1ec;
  --warn-bg: #faf6ee;
  --warn-line: #ece0c6;
  --warn-ink: #574316;
  --radius: 10px;
  --maxw: 780px;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  line-height: 1.65; font-size: 17px; letter-spacing: -0.003em;
  word-break: keep-all; overflow-wrap: break-word;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }

.disclaimer-bar {
  background: var(--ink); color: #d8dbe0; font-size: 12.5px; text-align: center;
  padding: 7px 16px; letter-spacing: 0;
}

.brand {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 20px 0;
  display: flex; align-items: baseline; gap: 9px;
}
.brand-mark { font-weight: 800; font-size: 20px; color: var(--accent); }
.brand-en { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 90px; }

/* HERO */
.hero { padding: 38px 0 8px; }
.hero h1 {
  font-size: clamp(27px, 5vw, 37px); line-height: 1.3; font-weight: 800;
  letter-spacing: -0.012em; margin: 0 0 18px;
}
.hero h1 em {
  display: block; margin-top: 10px; color: var(--accent);
  font-style: normal; font-size: clamp(21px, 3.6vw, 28px); font-weight: 800;
}
.lede { font-size: 17px; color: var(--ink-soft); margin: 0 0 20px; }
.lede strong { color: var(--ink); font-weight: 700; }

.gets {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
}
.gets li { font-size: 14.5px; color: var(--ink-soft); position: relative; padding-left: 22px; }
.gets li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--pos); font-weight: 800; }
.gets li strong { color: var(--ink); font-weight: 700; }

.btn-primary {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 13px 26px; border-radius: 9px;
  box-shadow: 0 4px 14px rgba(31,58,95,.22); transition: background .15s ease, transform .1s ease;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { transform: translateY(1px); }

/* 핵심 고지 */
.caveat-callout {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-left: 3px solid #c9a85f; border-radius: var(--radius);
  padding: 15px 18px; margin: 30px 0 36px; font-size: 14.5px;
  color: var(--warn-ink); line-height: 1.62;
}
.caveat-callout strong { color: #4a3811; }
.caveat-callout em { font-style: normal; font-weight: 700; text-decoration: underline; }

/* 트랙레코드 */
.track h2 { font-size: 20px; font-weight: 800; margin: 0 0 10px; letter-spacing: -0.012em; }
.track h2 .period {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: #eef0f3; padding: 2px 8px; border-radius: 6px; vertical-align: middle; margin-left: 4px;
}
.read-how { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.6; }
.read-how strong { color: var(--ink); }

/* 분포 막대 (위치 기반 + 적/녹 존 — 색각 보조) */
.bar {
  position: relative; display: block; height: 9px; border-radius: 5px;
  background: linear-gradient(90deg, var(--zone-neg) 0 40%, var(--zone-pos) 40% 100%);
  margin: 3px 0;
}
.bar .zero { position: absolute; left: 40%; top: -4px; bottom: -4px; width: 1.5px; background: #9aa0ab; }
.bar .span { position: absolute; top: 0; height: 9px; border-radius: 5px; background: rgba(108,116,130,.5); }
.bar .med { position: absolute; top: -3px; width: 3px; height: 15px; border-radius: 2px; background: var(--accent); }
tr.control .bar .med { background: var(--muted); }
tr.control .bar .span { background: rgba(140,146,158,.42); }

/* 범례 */
.dist-legend {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 11px 14px; margin-bottom: 12px;
}
.lg-bar { position: relative; display: block; width: 120px; min-width: 120px; height: 9px; border-radius: 5px;
  background: linear-gradient(90deg, var(--zone-neg) 0 40%, var(--zone-pos) 40% 100%); }
.lg-bar .zero { position: absolute; left: 40%; top: -4px; bottom: -4px; width: 1.5px; background: #9aa0ab; }
.lg-bar .span { position: absolute; top: 0; height: 9px; border-radius: 5px; background: rgba(108,116,130,.5); }
.lg-bar .med { position: absolute; top: -3px; width: 3px; height: 15px; border-radius: 2px; background: var(--accent); }
.lg-items { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-soft); }
.lg-item { display: inline-flex; align-items: center; gap: 5px; }
.key { width: 13px; height: 10px; border-radius: 2px; display: inline-block; }
.key-line { width: 2px; height: 13px; background: #9aa0ab; }
.key-range { background: rgba(108,116,130,.5); }
.key-med { width: 3px; height: 13px; background: var(--accent); }
.lg-dir { color: var(--muted); font-size: 11.5px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; min-width: 580px; }
thead th {
  font-size: 12px; font-weight: 700; color: var(--muted); text-align: right;
  padding: 12px 12px; border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
thead th:first-child { text-align: left; }
thead th.col-dist { text-align: left; }
tbody th {
  text-align: left; font-weight: 700; font-size: 14.5px; padding: 14px 12px;
  border-bottom: 1px solid var(--line); line-height: 1.4;
}
tbody th .n { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
tbody td {
  text-align: right; padding: 14px 12px; font-size: 14.5px;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
.neg { color: var(--neg); }
.pos { color: var(--pos); }
.strong { font-weight: 800; }
tr.control { background: #f6f7f8; }
tr.control th, tr.control td { color: var(--muted); }
tr.control .neg, tr.control .pos { opacity: .85; }
.tag {
  display: inline-block; font-size: 10.5px; font-weight: 700; background: #e7eaef;
  color: var(--accent); padding: 1px 6px; border-radius: 5px; margin-left: 4px;
  vertical-align: middle; letter-spacing: 0;
}
td.dist { width: 150px; min-width: 130px; }
.method { font-size: 12px; color: var(--muted); margin: 12px 2px 0; line-height: 1.55; }

/* 정직 박스 */
.honesty {
  margin: 44px 0; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 22px 24px;
}
.honesty h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.honesty ul { margin: 0; padding: 0; list-style: none; }
.honesty li { font-size: 14.5px; color: var(--ink-soft); padding: 7px 0; line-height: 1.6; }
.honesty li strong { color: var(--ink); font-weight: 700; }

/* CTA */
.cta { margin-top: 54px; text-align: center; }
.cta h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.012em; margin: 0 0 12px; line-height: 1.35; }
.cta-boundary { font-size: 15px; color: var(--ink-soft); max-width: 520px; margin: 0 auto 24px; }
.cta-boundary strong { color: var(--accent); }
.form-placeholder {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 34px 20px; background: var(--panel); color: var(--ink-soft);
}
.form-placeholder .small { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.tally-embed { min-height: 280px; }
.tally-embed iframe { width: 100%; border: 0; }
.trust {
  list-style: none; padding: 0; margin: 20px 0 0; display: flex; justify-content: center;
  flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--muted);
}
.trust li { position: relative; padding-left: 16px; }
.trust li::before { content: "·"; position: absolute; left: 4px; font-weight: 800; color: var(--pos); }
.disclaimer-inline { font-size: 12px; color: var(--muted); margin: 18px auto 0; max-width: 540px; }

/* footer */
footer { border-top: 1px solid var(--line); max-width: var(--maxw); margin: 60px auto 0; padding: 28px 20px 60px; }
.footer-brand { font-weight: 800; color: var(--accent); font-size: 15px; margin: 0 0 8px; }
.footer-disc { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }

/* 모바일 sticky CTA */
.sticky-cta {
  display: none; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 50;
  background: var(--accent); color: #fff; text-align: center; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 15px; border-radius: 11px;
  box-shadow: 0 6px 22px rgba(31,58,95,.28);
}

/* ===== 모바일: 표 → 카드 ===== */
@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding-bottom: 96px; }
  .dist-legend { gap: 10px 14px; }
  .table-wrap { border: none; overflow: visible; background: transparent; }
  table { min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  table, tbody, tr, th, td { display: block; }
  tbody tr {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 16px; margin-bottom: 12px;
  }
  tbody tr.control { background: #f6f7f8; }
  tbody th[scope="row"] {
    border: none; padding: 0 0 10px; font-size: 16px;
    border-bottom: 1px solid var(--line); margin-bottom: 8px;
  }
  tbody td {
    border: none; padding: 5px 0; text-align: right; white-space: normal;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
  }
  tbody td::before {
    content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 13px; text-align: left;
  }
  td.dist { display: block; padding-top: 10px; width: auto; }
  td.dist::before { content: "분포 (코스피 대비)"; display: block; margin-bottom: 8px; }
  td.dist .bar { min-width: 0; height: 11px; }
  .sticky-cta { display: block; }
  .hero .btn-primary { display: block; text-align: center; }
}
