/* 발표 자료 팔레트와 일치
 * Primary: #4F46E5 (indigo) · Accent: #DC2626 (red) · Deep: #312E81
 */

:root {
  --ink: #0A0A0A;
  --muted: #71717A;
  --faint: #A1A1AA;
  --indigo: #4F46E5;
  --indigo-dark: #312E81;
  --indigo-tint: #EEF2FF;
  --red: #DC2626;
  --red-tint: #FEF2F2;
  --line: #E5E5E5;
  --line-strong: #D4D4D8;
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --bg-card: #F4F4F5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR",
               "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  margin-bottom: 32px;
}
.site-header .wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header .kicker {
  font-size: 10px;
  color: var(--indigo);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.site-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.site-header nav a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
}
.site-header nav a:hover { color: var(--indigo); }
.site-header nav a.active { color: var(--ink); font-weight: 600; }

/* ── Hero ── */
.hero {
  padding: 24px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.hero .kicker {
  font-size: 10px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.hero h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 15px;
  color: var(--muted);
  max-width: 640px;
}

/* ── Scale cards (Layer 1) ── */
.scale-grid {
  display: grid;
  gap: 32px;
}

.scale {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--indigo);
  padding: 24px;
  border-radius: 0;
}
.scale h3 {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--indigo);
  margin-bottom: 12px;
  text-transform: uppercase;
  font-weight: 700;
}
.scale .title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.scale .desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  font-style: italic;
}

.q {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.q:last-of-type { border-bottom: none; }
.q .label {
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}
.options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.option {
  flex: 1;
  min-width: 80px;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--ink);
}
.option:hover { border-color: var(--indigo); background: var(--indigo-tint); }
.option.selected {
  background: var(--indigo);
  color: var(--bg);
  border-color: var(--indigo);
  font-weight: 600;
}
.option .num {
  display: block;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}

/* numeric input for Dunbar */
.num-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
}
.num-input:focus {
  outline: none;
  border-color: var(--indigo);
  background: var(--indigo-tint);
}

/* ── Result box ── */
.result {
  margin-top: 28px;
  padding: 24px;
  background: var(--bg-soft);
  border-left: 4px solid var(--indigo);
}
.result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.result-row:last-child { border-bottom: none; }
.result-label { font-size: 14px; color: var(--muted); }
.result-score {
  font-size: 28px;
  font-weight: 700;
  color: var(--indigo);
}
.result-score.warn { color: var(--red); }
.result-interp {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink);
}

/* ── Final summary (all 3 scales combined) ── */
.summary {
  margin-top: 48px;
  padding: 32px;
  background: #0A0A0F;
  color: var(--bg);
}
.summary h3 {
  font-size: 11px;
  color: #8B85F0;
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 700;
}
.summary .big {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.summary .big.red { color: #F87171; }
.summary .desc {
  font-size: 14px;
  color: #A1A1AA;
  max-width: 600px;
}

/* ── Dashboard (Layer 3) ── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.dash-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 0;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}
.dash-card .title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}
.dash-card canvas {
  flex: 1;
  max-height: 160px;
  width: 100% !important;
  height: auto !important;
}

/* Upload zone */
.upload-zone {
  display: block;
  margin: 32px 0;
  padding: 48px 32px;
  border: 2px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag {
  border-color: var(--indigo);
  background: var(--indigo-tint);
}
.upload-zone h4 {
  font-size: 16px;
  margin-bottom: 8px;
}
.upload-zone p {
  font-size: 12px;
  color: var(--muted);
}
.upload-zone input[type=file] { display: none; }
.mode-toggle {
  display: inline-flex;
  gap: 0;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 24px;
}
.mode-toggle button {
  padding: 8px 20px;
  font-size: 13px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  color: var(--muted);
  font-weight: 500;
}
.mode-toggle button.active {
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.takeaway {
  background: var(--bg-soft);
  border-left: 4px solid var(--indigo);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14px;
  font-weight: 600;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 20px;
  margin-top: 40px;
  font-size: 12px;
  color: var(--faint);
}
.site-footer .wrap {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--indigo); }

/* ── Source citation ── */
.source {
  font-size: 11px;
  color: var(--faint);
  font-style: italic;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .dash-grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: 24px; }
  .summary .big { font-size: 36px; }
}
