/* === Base === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;700;900&family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-tertiary: #999999;
  --accent: #1a365d;
  --accent-light: #ebf4ff;
  --border: #e8e6e1;
  --border-light: #f0eeea;
  --green: #1a7a4c;
  --green-bg: #edf7f1;
  --green-border: #c6e9d4;
  --red: #b91c1c;
  --red-bg: #fef5f5;
  --red-border: #fecaca;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --blue: #1e40af;
  --blue-bg: #f0f4ff;
  --blue-border: #bfdbfe;
  --purple: #7c3aed;
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;
  --radius: 12px;
  --radius-sm: 6px;
  --max-width: 680px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
}

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

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 15.5px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* === Header === */
.site-header {
  padding: 80px 0 48px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.logo {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 2.4rem;
  letter-spacing: 0.2em;
  font-weight: 900;
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.tagline {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* === Landing === */
.intro {
  padding: 48px 0 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.9;
  border-bottom: 1px solid var(--border-light);
}

.intro strong {
  color: var(--text);
  font-weight: 600;
}

.topics {
  padding-top: 40px;
  padding-bottom: 60px;
}

.topics h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  font-weight: 600;
}

.topic-grid {
  display: grid;
  gap: 16px;
}

.topic-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.topic-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.topic-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}

.topic-card h3 {
  font-family: 'Noto Serif KR', Georgia, serif;
  margin: 10px 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
}

.topic-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.7;
}

/* === Verdict badges === */
.verdict {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.verdict-true { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.verdict-false { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.verdict-conditional { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.verdict-unclear { background: #f5f5f4; color: var(--text-secondary); border: 1px solid var(--border); }

/* === Topic Page === */
.topic-header {
  padding: 48px 0 40px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.topic-header .back {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.topic-header .back:hover { color: var(--accent); }

.topic-header h1 {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 1.75rem;
  margin: 20px 0 16px;
  line-height: 1.45;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.topic-meta {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* === Content sections === */
.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
}

.section:last-of-type { border-bottom: none; }

.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.label-common .dot { background: var(--text-tertiary); }
.label-common { color: var(--text-secondary); }
.label-for .dot { background: var(--green); }
.label-for { color: var(--green); }
.label-against .dot { background: var(--red); }
.label-against { color: var(--red); }
.label-individual .dot { background: var(--purple); }
.label-individual { color: var(--purple); }
.label-conclusion .dot { background: var(--accent); }
.label-conclusion { color: var(--accent); }

.section h3 {
  font-size: 1rem;
  margin: 24px 0 8px;
  font-weight: 600;
}

.section h3:first-of-type { margin-top: 0; }

.section > p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-weight: 300;
}

.section > p strong {
  color: var(--text);
  font-weight: 600;
}

/* === Evidence card === */
.evidence {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.evidence:hover {
  box-shadow: var(--shadow-md);
}

.evidence.for {
  border-left: 4px solid var(--green);
  background: linear-gradient(135deg, var(--green-bg) 0%, var(--surface) 60%);
}

.evidence.against {
  border-left: 4px solid var(--red);
  background: linear-gradient(135deg, var(--red-bg) 0%, var(--surface) 60%);
}

.evidence.neutral {
  border-left: 4px solid var(--amber);
  background: linear-gradient(135deg, var(--amber-bg) 0%, var(--surface) 60%);
}

.evidence p {
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 0;
}

.evidence p strong {
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.evidence .source {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-style: italic;
}

/* === Evidence header with claim + rating === */
.evidence-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.evidence-header .claim {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}

/* === Rating badges === */
.rating {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.rating-certain {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  color: #ffffff;
}

.rating-high {
  background: linear-gradient(135deg, var(--blue) 0%, #3b82f6 100%);
  color: #ffffff;
}

.rating-low {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.rating-very-low {
  background: #f5f5f4;
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

/* === Rating detail (sub-criteria) === */
.rating-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.rd-item {
  font-size: 0.73rem;
  color: var(--text-tertiary);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  line-height: 1.5;
}

/* === Rating caveat === */
.rating-caveat {
  font-size: 0.82rem;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 12px 0 0;
  line-height: 1.6;
  font-weight: 400;
}

/* === Individual differences table === */
.diff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  font-size: 0.88rem;
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.diff-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--purple-bg);
  color: var(--purple);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--purple-border);
}

.diff-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-weight: 300;
  background: var(--surface);
}

.diff-table tr:last-child td { border-bottom: none; }

.diff-table tr:hover td { background: #faf9f7; }

.diff-table td strong {
  color: var(--text);
  font-weight: 500;
}

.need-high {
  color: var(--green);
  font-weight: 600;
  background: var(--green-bg);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  display: inline-block;
}

.need-low {
  color: var(--text-tertiary);
  font-weight: 500;
  background: #f5f5f4;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  display: inline-block;
}

.need-medium {
  color: var(--amber);
  font-weight: 600;
  background: var(--amber-bg);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  display: inline-block;
}

/* === Conclusion box === */
.conclusion-box {
  background: var(--surface);
  border: 2px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 32px;
  margin: 20px 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.conclusion-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, #6366f1 50%, var(--purple) 100%);
}

.conclusion-box h3 {
  font-family: 'Noto Serif KR', Georgia, serif;
  color: var(--blue);
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
}

.conclusion-box p {
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 300;
  line-height: 1.85;
}

.conclusion-box p strong {
  font-weight: 600;
  color: var(--accent);
}

.conclusion-box p:last-of-type { margin-bottom: 0; }

.confidence {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.confidence-bar {
  display: flex;
  gap: 4px;
}

.confidence-bar span {
  width: 24px;
  height: 10px;
  border-radius: 5px;
  background: #e2e8f0;
  transition: background 0.3s ease;
}

.confidence-bar span.filled {
  background: linear-gradient(135deg, var(--blue) 0%, #6366f1 100%);
}

/* === Practical Guide === */
.guide-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}

.guide-box h3 {
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}

.guide-box p {
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 12px;
}

.guide-box p strong { color: var(--text); font-weight: 600; }

.guide-formula {
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin: 16px 0;
}

.guide-examples {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.guide-example {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
  font-size: 0.85rem;
}

.ge-weight {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.ge-arrow {
  display: block;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  margin: 2px 0;
}

.ge-result {
  display: block;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

.guide-note {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-top: 8px;
  margin-bottom: 0;
}

/* Urine chart */
.urine-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.urine-level {
  display: flex;
  align-items: center;
  gap: 12px;
}

.urine-color {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.urine-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.urine-desc strong {
  color: var(--text);
  font-weight: 600;
}

/* Principles */
.guide-principles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gp-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.gp-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.gp-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
}

.gp-item p strong {
  color: var(--text);
  font-weight: 600;
}

/* === Sources === */
.sources {
  padding: 32px 0;
}

.sources h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  font-weight: 600;
}

.sources ol {
  padding-left: 20px;
  counter-reset: source-counter;
  list-style: none;
}

.sources li {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  padding-left: 8px;
  position: relative;
  counter-increment: source-counter;
  line-height: 1.6;
}

.sources li::before {
  content: counter(source-counter) ".";
  position: absolute;
  left: -20px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

.sources a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.sources a:hover {
  border-bottom-color: var(--accent);
}

/* === Footer === */
.site-footer {
  padding: 40px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-light);
  margin-top: 20px;
  font-weight: 300;
}

/* === Responsive === */
@media (max-width: 600px) {
  .site-header { padding: 56px 0 36px; }
  .logo { font-size: 1.8rem; }
  .topic-header { padding: 36px 0 28px; }
  .topic-header h1 { font-size: 1.35rem; }
  .section { padding: 28px 0; }
  .evidence { padding: 16px 18px; }
  .conclusion-box { padding: 24px 20px; }
  .diff-table { font-size: 0.8rem; }
  .diff-table th, .diff-table td { padding: 10px 12px; }
  .topic-meta { font-size: 0.78rem; }
  .evidence-header { flex-direction: column; gap: 8px; }
  .rating-detail { gap: 4px; }
  .rd-item { font-size: 0.7rem; }
  .guide-examples { grid-template-columns: repeat(2, 1fr); }
  .guide-box { padding: 20px 18px; }
}
