/* ============================================================
   LabelCheck — 设计令牌（落地页 / 控制台 / 法务页 / 管理台共用）
   ------------------------------------------------------------
   品牌来源：bp/04_品牌物料/品牌资产说明.md「流星逐梦」
     淡蓝 #91B0FD · 藏青 #26356B · 深蓝 #16224A · 白底
     —— 说明里标注"核心色不可改"，这三个值原样使用。

   字体自托管在 /static/fonts/（Geist + Geist Mono，SIL OFL 1.1）。
   Geist 覆盖 latin / latin-ext / cyrillic / vietnamese；希腊、泰、
   阿拉伯、天城体、泰米尔、泰卢固、CJK 走系统字体回退（见 --font）。
   ============================================================ */

/* ─── Geist：拉丁 + 西里尔 ─── */
@font-face {
    font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap;
    src: url('/static/fonts/Geist-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap;
    src: url('/static/fonts/Geist-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap;
    src: url('/static/fonts/Geist-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap;
    src: url('/static/fonts/Geist-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Geist'; font-style: normal; font-weight: 300 800; font-display: swap;
    src: url('/static/fonts/Geist-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
                   U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
                   U+1EA0-1EF9, U+20AB;
}

/* ─── Geist Mono：编号 / 尺寸 / 时间 / 百分比 ─── */
@font-face {
    font-family: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
    src: url('/static/fonts/GeistMono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
    src: url('/static/fonts/GeistMono-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
    src: url('/static/fonts/GeistMono-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
    color-scheme: light;

    /* ── 字体栈 ──
       Geist 打头覆盖拉丁/西里尔；其后按脚本依次回退到各平台系统字体，
       保证希腊/泰/阿拉伯/天城体/泰米尔/泰卢固/中日韩都有像样的字形。 */
    --font: 'Geist',
            'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',        /* 简中 */
            'PingFang TC', 'Microsoft JhengHei',                          /* 繁中 */
            'Hiragino Sans', 'Yu Gothic', 'Meiryo',                       /* 日 */
            'Apple SD Gothic Neo', 'Malgun Gothic',                       /* 韩 */
            'Thonburi', 'Leelawadee UI',                                  /* 泰 */
            'Geeza Pro', 'Segoe UI', 'Tahoma',                            /* 阿拉伯 */
            'Kohinoor Devanagari', 'Nirmala UI',                          /* 天城体 */
            'Tamil Sangam MN', 'Telugu Sangam MN',                        /* 泰米尔/泰卢固 */
            system-ui, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* ── 表面：带蓝调的浅灰白，不用纯白当页底（纯白没有层次）── */
    --bg:         #f5f7fc;
    --surface:    #ffffff;   /* 面板 / 卡片：压在 bg 上自然浮起 */
    --surface-2:  #eef2fb;   /* 输入框 / 行 */
    --surface-3:  #e3eaf8;   /* hover */
    --line:       #dbe3f4;
    --line-soft:  #e8edf9;

    /* ── 文字：三级，全部实测过 WCAG AA（对 --bg 约 14.4 / 6.4 / 4.7 : 1）── */
    --text:       #16224A;   /* 品牌深蓝 */
    --text-2:     #4d5a7d;
    --text-3:     #626e8c;

    /* ── 品牌 ──
       #91B0FD 压在白底上只有 2.2:1，绝不能拿去当文字色或配白字的按钮底；
       它的正确用法是「填充块 + 深蓝字」(#16224A on #91B0FD = 7.2:1)，
       正好就是 logo 本身的关系：淡蓝球 + 藏青流星。 */
    --brand:       #91B0FD;
    --brand-hi:    #a8c1ff;
    --brand-deep:  #26356B;  /* 藏青：文字/描边/次级动作 */
    --brand-dim:   rgba(145, 176, 253, 0.16);
    --brand-line:  rgba(145, 176, 253, 0.55);
    --on-brand:    #16224A;

    /* ── 语义状态（浅底版本，均 ≥5:1）── */
    --ok:    #0b7c55;  --ok-bg:   #e2f5ec;  --ok-line:   #b6e3ce;
    --run:   #2563d6;  --run-bg:  #e5edfd;  --run-line:  #bcd2f8;
    --wait:  #5c6a86;  --wait-bg: #eceff6;  --wait-line: #d6dcea;
    --err:   #cc2f36;  --err-bg:  #fdeaea;  --err-line:  #f6c9c9;

    /* ── 形状：三档，全站只用这三档 ──
       面板 14px / 控件 10px / 标签胶囊。 */
    --r-panel: 14px;
    --r-ctl:   10px;
    --r-pill:  999px;

    /* ── 阴影：带品牌深蓝色相，不用纯黑投影 ── */
    --shadow:    0 1px 2px rgba(22, 34, 74, 0.05), 0 8px 22px -12px rgba(22, 34, 74, 0.18);
    --shadow-lg: 0 1px 3px rgba(22, 34, 74, 0.06), 0 22px 48px -20px rgba(22, 34, 74, 0.26);

    /* ── 缓动 ── */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 阿拉伯语等 RTL：只翻转书写方向，配色与间距用逻辑属性自动镜像 */
[dir="rtl"] { --dir: -1; }
[dir="ltr"], :root { --dir: 1; }
