/**
 * 🎨 타이포그래피 강화 애드온
 * 기존 hospital_ai.css에 추가되는 타이포그래피 개선 스타일
 */

/* ========== 전역 타이포그래피 강화 ========== */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    line-height: 1.3;
    font-weight: 700;
    color: #0f172a;
    text-rendering: optimizeLegibility;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h4 {
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}

/* ========== 본문 텍스트 강화 ========== */
p {
    line-height: 1.75;
    letter-spacing: -0.01em;
    color: #334155;
    margin-bottom: 1em;
}

strong, b {
    font-weight: 650;
    color: #1e293b;
}

em, i {
    font-style: italic;
    color: #475569;
}

/* ========== 코드 및 모노스페이스 폰트 ========== */
code, pre, .monospace {
    font-family: 'D2Coding', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', monospace;
    font-feature-settings: "liga" 1, "calt" 1;
    letter-spacing: 0;
}

code {
    font-size: 0.875em;
    padding: 0.2em 0.4em;
    background: #f1f5f9;
    border-radius: 4px;
    color: #0f172a;
}

pre {
    font-size: 0.9375rem;
    line-height: 1.7;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 10px;
    overflow-x: auto;
}

/* ========== 링크 타이포그래피 ========== */
a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ========== 리스트 타이포그래피 ========== */
ul, ol {
    line-height: 1.8;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.5em;
    letter-spacing: -0.01em;
}

/* ========== 뱃지 및 태그 타이포그래피 ========== */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1;
}

/* ========== 버튼 타이포그래피 ========== */
.btn, button, [type="button"], [type="submit"] {
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

/* ========== 입력 필드 타이포그래피 ========== */
input, textarea, select {
    font-size: 0.9375rem;
    font-weight: 450;
    letter-spacing: -0.005em;
    line-height: 1.6;
}

input::placeholder, textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* ========== 카드 및 패널 타이틀 ========== */
.card-title, .panel-title, .section-header {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.4;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

/* ========== 메타 정보 텍스트 ========== */
.meta-text, .caption, .helper-text {
    font-size: 0.8125rem;
    font-weight: 450;
    color: #64748b;
    letter-spacing: 0;
    line-height: 1.5;
}

/* ========== 에러 및 경고 메시지 ========== */
.error-text, .warning-text, .success-text {
    font-size: 0.875rem;
    font-weight: 550;
    letter-spacing: -0.005em;
    line-height: 1.6;
}

.error-text {
    color: #dc2626;
}

.warning-text {
    color: #ea580c;
}

.success-text {
    color: #16a34a;
}

/* ========== 숫자 표시 강화 ========== */
.numeric {
    font-feature-settings: "tnum" 1; /* Tabular numerals */
    font-variant-numeric: tabular-nums;
}

/* ========== 대시보드 숫자 ========== */
.dashboard-number, .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    font-feature-settings: "tnum" 1;
}

/* ========== 반응형 타이포그래피 ========== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    body.hospital-document-ai-page {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .dashboard-number, .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.125rem; }
    
    body.hospital-document-ai-page {
        font-size: 14px;
    }
}

