/**
 * Typography System
 *
 * Shared type scale and dense admin text tokens used across list pages,
 * popups, and settings screens.
 */
/* T876 (2026-05-17) Typography Token Sweep — distinct font-size 11→8 압축.
   admin type scale 정합 (12→14→16→20→24→32). dead 3 제거 (21, typography-caption-sm, typography-body-sm) +
   26/28 → 24 redirect. T641 redirect 패턴 cross-port. T676 hierarchy 6단계 보존 (variant 17→15). */
:root {
    /* T697 (2026-05-11) — Asia 제거 (한국어 두꺼움 본질 원인).
       T699 (2026-05-11) — Pretendard → Spoqa Han Sans Neo 전환 (사용자 명시 "Pretendard 취향 안 맞음, 한글 고급 재설계").
       T700 (2026-05-11) — Phase 2C self_seller cross-port: Inter Tight (display) + JetBrains Mono (숫자) 추가. */
    --font-family-base: 'Spoqa Han Sans Neo', 'Malgun Gothic', -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
    --font-family-display: 'Inter Tight', 'Spoqa Han Sans Neo', system-ui, -apple-system, sans-serif;  /* T700: 큰 제목/Hero 숫자/Brand mark */
    --font-family-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;  /* T700: 숫자 데이터/KPI value/tabular */
    /* T641 (2026-05-11) Typography Phase 1 — 11/13/15 token alias 통합 (NN Group/Major Third 권장 7-8 수렴, fontSize unique 11→8 추정).
       --font-size-11/13/15 = 12/14/14 redirect (+1~2px increase). admin-dense-xs/md 동시 정합. cross-domain 자동 적용 (var 약 460+ 사용처). */
    --font-size-9: 9px;           /* T662 — 9px literal 12건 흡수 (badge/superscript 마이크로 텍스트) */
    --font-size-10: 10px;         /* 10px literal + 페이지 로컬 사본 흡수 */
    --font-size-xs: 12px;         --font-size-sm: var(--font-size-12); --font-size-11: 12px;         --font-size-12: 12px;         --font-size-13: 14px;         --font-size-14: 14px;         --font-size-base: 14px;       --font-size-md: var(--font-size-base); --font-size-15: 14px;         --font-size-16: 16px;         --font-size-lg: 16px;         --font-size-xl: 18px;         --font-size-2xl: 20px;        --font-size-22: 22px;         /* T662 — 22px literal 46건 흡수 (heading) — T876: --font-size-21 dead 제거 */
    --font-size-3xl: 24px;        --font-size-4xl: 48px;        --font-size-5xl: 64px;        --font-weight-light: 300;  /* T880: --font-size-26/28 dead 제거 (canonical 3xl 통합, T876 sweep 완결) */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    /* 2026-06-17 — Spoqa Han Sans Neo는 600 weight 파일 미보유(로드=100/300/400/500/700).
       semibold 600은 한글에서 폰트매칭상 700으로 phantom 승격 렌더 → 다크테마 고DPI 뭉개짐(사용자 보고).
       로드된 500(Medium)에 매핑해 의도된 medium-emphasis 유지(과bold 차단). var 사용처 704곳 일괄 경량화. */
    --font-weight-semibold: 500;
    --font-weight-bold: 700;
    /* 2026-06-17 — Spoqa 800/900 파일 미보유 → 한글서 700 렌더. 토큰을 실제 렌더값(700)에 정합(phantom 정리, 시각 무변화). */
    --font-weight-extrabold: 700;     /* T661 800→700 정합 (Spoqa 800 미배포) */
    --font-weight-black: 700;
    /* 2026-07-28 — display(Inter Tight) 전용. 일반 weight 스케일 확장이 아니라
       "현재 배포된 display face 를 고정하는 값"이다.
       Inter Tight 는 800 face 를 실제 배포한다(InterTight-800.woff2) — 위 extrabold/black(700)과
       달리 여기서는 800 이 실렌더된다. Spoqa 는 700 이 최대라 본문에 쓰면 700 으로 렌더되어 무의미하다.
       display 경로 = 이 파일 하단의 h1,h2,h3,.page-title,.section-title,.modal-title,.modal .modal-h 규칙.
       900 선언을 이 값으로 정규화한 건 Inter Tight 에 900 face 가 없어 이미 800 으로 렌더되기 때문이며,
       InterTight-900 이 도입되면 그 시점에 재검토 대상이다. */
    --font-weight-display-heavy: 800;
    --line-height-none: 1;
    --line-height-xtight: 1.15;       /* T660 (2026-05-10) Typography Phase 3 — line-height token consolidation. 1.1/1.15 literal 흡수 (max ±5% 회귀). */
    --line-height-tight: 1.2;
    /* T684 (2026-05-10) 사용자 보고 "이전 타이포 작업때부터 두꺼워짐" 본질 rollback — base/comfortable 토큰 값 이전 평균값으로 복원 */
    --line-height-base: 1.25;         /* T660 1.3 → T684 1.25 복원 (이전 1.25 사용 영역 시각 회복) */
    --line-height-snug: 1.375;        /* 기존 정의 유지. 1.35 literal 흡수 (+1.85%) */
    --line-height-comfortable: 1.4;   /* T660 1.45 → T684 1.4 복원 (이전 1.4 사용 영역 시각 회복, Bootstrap 1.4285714286과 -2% 정합) */
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;       /* T660 1.625 → T684 1.6 복원 (1.55/1.6/1.65 평균에 더 가까움) */
    --line-height-loose: 1.75;
    --letter-spacing-tight: -0.025em;

    /* T675 Phase B (2026-05-10) — Number typography 토큰 (Pretendard tnum/lnum OpenType feature 활용) */
    /* Binance BinancePlex / Stripe Sohne tabular-figure 패턴 cross-port — 별도 monospace 폰트 로드 0 */
    /* T682 (2026-05-10) hotfix — Pretendard default features (kern/liga/calt) 명시 보존 — 한국어 자모 간격/리가처/문맥 대안 가독성 회복 */
    --font-feature-base: "kern" 1, "liga" 1, "calt" 1;             /* Pretendard 한국어 default — 자모 간격/연자/문맥 대안 */
    --font-feature-tabular: "kern" 1, "liga" 1, "calt" 1, "tnum" 1, "lnum" 1;
    --font-feature-tabular-slashed: "kern" 1, "liga" 1, "calt" 1, "tnum" 1, "lnum" 1, "zero" 1;
    --font-family-number: var(--font-family-base);   /* Pretendard 자체 tabular 지원 */

    /* T682 (2026-05-10) — font-weight 700+ 한국어 letter-spacing 미세 보정 (자모 두께로 인한 시각 압축 보완) */
    --letter-spacing-bold-ko: 0.005em;       /* Pretendard 700+ 한국어 — 자모 stem 두께 보완 (지나친 압축 방지) */
    --letter-spacing-extrabold-ko: 0.01em;   /* Pretendard 800+ 한국어 — 더 강한 보완 */

    /* T676 Phase C (2026-05-10) — Typography hierarchy 5단계 → 13단계 확장 (Binance/Linear/Stripe schema 1:1)
       기존 admin-dense-* / xs~5xl 토큰 보존 (변경 0, 시각 회귀 0). semantic name 별도 추가 — 신규 컴포넌트용 reference */

    /* Display (마케팅/랜딩 페이지, login/error 등 admin 외 영역 — 최소 사용) */
    --typography-display-xl: 56px;          /* Binance hero-display 64 → admin 보수 56 */
    --typography-display-lg: 40px;
    --typography-display-md: 32px;
    --typography-display-sm: 24px;          /* h1 페이지 타이틀과 정합 */

    /* Title (admin 페이지 heading) */
    --typography-title-lg: 22px;            /* page-title 26 alternative, --font-size-22 정합 */
    --typography-title-md: 18px;            /* section-title --font-size-xl 정합 */
    --typography-title-sm: 16px;            /* sub-section, modal-title */

    /* Body (본문) */
    --typography-body-md: 14px;             /* admin-dense-md 정합 */
    /* T876: --typography-body-sm 13px dead 제거 (호출 0건, body hierarchy md 단독) */

    /* Caption / Label (작은 텍스트, KPI label, table thead) */
    --typography-caption: 12px;             /* admin-dense-sm 정합, T668 thead */
    /* T876: --typography-caption-sm 11px dead 제거 (호출 0건, caption hierarchy caption/micro 만 보존) */
    --typography-micro: 9px;                /* badge superscript, T662 정합 */

    /* Number (T675 Phase B에서 정착, hierarchy 명시) */
    --typography-number-display: 24px;      /* KPI hero value (현재 .kpi-value 20px 보존, hero variant용) */
    --typography-number-md: 14px;           /* table cell-amount */
    --typography-number-sm: 12px;           /* chart axis label */

    /* Button (admin 36px touch target T589) */
    --typography-button: 14px;              /* btn font-size 표준 */
    --typography-button-sm: 12px;           /* btn-sm */

    /* Letter spacing (heading 압축, body 표준) */
    --letter-spacing-display: -0.5px;       /* display-xl/lg 큰 heading 압축 (Binance/Stripe 정합) */
    --letter-spacing-title: -0.2px;         /* title-lg/md 미세 압축 */
    --letter-spacing-body: 0;
    --letter-spacing-caption: 0.02em;       /* caption / label 미세 확장 (가독성) */
    --letter-spacing-micro: 0.05em;         /* badge / superscript 가독성 */
    --font-size-admin-dense-xs: 12px;  /* T641 (2026-05-11) — 11→12 통합 (Typography Phase 1 fontSize cleanup) */
    --font-size-admin-dense-sm: 12px;
    --font-size-admin-dense-md: 14px;  /* T641 (2026-05-11) — 13→14 통합 (Typography Phase 1 fontSize cleanup) */
    --font-size-admin-dense-lg: 16px;  /* T600α (2026-05-10) — 17→16 통합 (NN Group 권장 4-7 종 수렴) */
    --font-size-admin-dense-kpi: 18px;
    --font-size-empty-state-icon: 80px;
}

.admin-dense-page {
    /* T589 — Material Design Dense + NN Group desktop sweet spot. 1920+ 해상도 Fitts's Law +6% 효율 (2026-05-10) */
    --btn-height: 36px;
    --btn-min-height: 36px;
    --density-button-height: 36px;
    --density-input-height: 36px;
    --density-search-input-height: 36px;
    --density-input-x: 8px;
    --density-input-y: 6px;
    --density-table-primary-x: 8px;
    --density-table-primary-y: 5px;
    --density-line-height-form: 1.35;
    --padding-card: 12px;
    --density-card: 12px;
}

/* ===========================================================
 * T700 (2026-05-11) Phase 2C — Inter Tight + JetBrains Mono selective 적용
 * self_seller premium-polish.css 패턴 1:1 cross-port
 * - h1/h2/h3/.page-title — Inter Tight (영문 display, 한국어는 fallback Spoqa)
 * - .kpi-value/.cell-amount — JetBrains Mono (tabular figure)
 * =========================================================== */

h1, h2, h3,
.page-title,
.section-title,
/* T704 (2026-05-11) Modal heading selective 확장 (Bootstrap 표준 + self_adm custom popup) */
.modal-title,
.modal .modal-header .modal-title,
.modal-header h1, .modal-header h2, .modal-header h3,
.modal-header h4, .modal-header h5, .modal-header h6,
.popup-title,
.popup-title-text,
.blockui-popup .popup-title,
/* T704 (2026-05-11) Sidebar section heading selective 확장 (alarm_area badge title) */
.admin_left_sidebar_wrapper .alarm_area .badge_box .badge_title .title,
.admin_left_sidebar_wrapper .alarm_area .speaker_box .badge_box .title,
/* T707 (2026-05-11) Card heading selective 확장 (Bootstrap card title + card-header h*) */
.card-title,
.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5, .card-header h6 {
    font-family: var(--font-family-display);
    letter-spacing: -0.025em;
    /* T705 (2026-05-11) OpenType base features 활성화 (kern/liga/calt) — Inter Tight 영문 자간 미세 조정 + Spoqa Han Sans Neo 한국어 자모 간격/연자/문맥 대안 가독성 강화 */
    font-feature-settings: var(--font-feature-base);
}

.orders-kpi-card .kpi-value,
.kpi-value,
.cell-amount,
.cell-money,
.cell-number,
[class*="cell-amount"],
.tabular-num,
.tnum {
    font-family: var(--font-family-mono);
    font-feature-settings: "tnum" 1, "lnum" 1;  /* tabular figure + lining nums */
    font-variant-numeric: tabular-nums lining-nums;
}
