/* ==========================================================================
   테마 시스템
   ─────────────────────────────────────────────────────────────────────────
   구조: 테마 = `html[data-theme="<id>"]` 의 CSS 변수 블록.
        밝기(`html[data-bs-theme="light|dark"]`)와 **직교**한다.
        → 테마마다 light / dark 두 벌을 정의하므로 기존 밝기 토글이 그대로 산다.

   테마 추가 방법 (JS 수정 불필요):
     1) 이 파일에 `html[data-theme="myid"] { … }` 블록 추가 (+ 필요하면 dark 블록)
     2) `js/themes.js` 의 THEMES 배열에 한 줄 추가 (id·이름·설명·스와치)
   그래서 **JS 에 색을 박지 않는다** — 모든 색은 아래 변수로만 들어온다.

   테마가 바꾸는 것: 표면·먹·강조·모양·타이포 + 3계열 상태색(--chart-done/wip/delay)
                    + **범주 팔레트(--fg-* 7종 / --stage-* 8종)**.

   ⚠ 되돌린 결정: 처음에는 "범주 색은 데이터 인코딩이니 테마와 무관하게 고정"
     으로 잡아 --fg-*/--stage-* 를 :root 에만 뒀다. 결과는 접수구분별 현황·
     진행상태 분포 위젯만 테마를 안 따라가는 것이었고, 사용자가 바로 알아챘다.
     한 화면 안에서 어떤 위젯은 테마색·어떤 위젯은 고정색이면 그게 더 어색하다.
     → 지금은 테마 × 밝기별로 정의한다(파일 끝 [PALETTE-BLOCK-V1] 블록).

   ⚠ 상태색·범주색은 전부 색각이상(protan·deutan·tritan)·명도·대비 검증을 통과한
     조합이다. 임의로 바꾸면 보장이 깨진다. 재생성·재검증은
     tools/gen4.js 로 한다 — dataviz 스킬 공식 검증기를 합격 기준으로 직접 호출한다.
   ========================================================================== */

/* ==========================================================================
   공통 — 범주 색 **폴백**

   ⚠ 여기 값은 폴백일 뿐이다. 실제 값은 파일 끝의 "테마별 범주 팔레트" 블록이
      테마 × 밝기별로 덮어쓴다. 예전에는 이 :root 값만 있어서 5개 테마 전부
      같은 색이 나왔다 — 접수구분별 현황·진행상태 분포 위젯이 테마를 안 따라간
      원인이 이것이었다(실측: signature→terra 로 바꿔도 --fg-1 이 #0d8bff 고정).
      `--chart-*`·`--lt-*` 는 테마 블록에 있어서 잘 바뀌던 것과 대비된다.
   ========================================================================== */
:root {
    /* 요청구분 7종 (신규·개선·수정·오류·사용법문의·시스템오류·기타) */
    --fg-1: #0c8ffc;
    --fg-2: #ff8342;
    --fg-3: #d556b2;
    --fg-4: #a80014;
    --fg-5: #00c3c5;
    --fg-6: #6b30af;
    --fg-7: #008854;

    /* 진행상태 8색 */
    --stage-1: #0c8ffc;
    --stage-2: #d5a200;
    --stage-3: #00baf9;
    --stage-4: #e36100;
    --stage-5: #6b30af;
    --stage-6: #00ca7f;
    --stage-7: #a80014;
    --stage-8: #d556b2;
}

/* ==========================================================================
   1) signature — 옴니이솔 시그니처 블루 (기본값)
   ========================================================================== */
html[data-theme='signature'] {
    --brand-blue: #00aaff;
    --brand-sky: #31b4ff;
    --brand-blue-ui: #0d8bff;
    --brand-gradient: linear-gradient(135deg, #0d8bff 0%, #31b4ff 100%);

    --theme-primary: #0d8bff;
    --theme-primary-rgb: 13, 139, 255;
    --theme-primary-bg-subtle: #e5f2ff;
    --theme-primary-border-subtle: #b8dcff;
    --theme-primary-text-emphasis: #0a5ba8;
    --theme-link-color: #0d8bff;
    --theme-link-hover-color: #0a6fd0;
    --theme-sidenav-bg: #0a2540;

    /* 3계열 상태색 — 전체쌍 CVD ΔE 9.6 / 정상 27.7 */
    --chart-done: #0acf97;
    --chart-wip: #0d8bff;
    --chart-delay: #ed5565;
    --chart-alt: #f8ac59; /* 전용개발 / 대기 */

    /* 리드타임 순차 램프 (명도 단조 감소) */
    --lt-1: #bfe3ff;
    --lt-2: #7cc6ff;
    --lt-3: #2f9dff;
    --lt-4: #0d6fd1;
    --lt-5: #0a4a8c;
    --lt-text-1: #0a4a8c;
    --lt-text-2: #0a4a8c;
    --lt-text-3: #ffffff;
    --lt-text-4: #ffffff;
    --lt-text-5: #ffffff;

    /* 모양·타이포 */
    --dash-radius: 6px;
    --dash-num-font: Pretendard, 'Noto Sans KR', sans-serif;
    --dash-num-weight: 700;
    --dash-num-ls: -0.02em;
}
html[data-theme='signature'][data-bs-theme='dark'] {
    --theme-primary: #31b4ff;
    --theme-primary-rgb: 49, 180, 255;
    --theme-primary-bg-subtle: #10283d;
    --theme-primary-border-subtle: #1d4f78;
    --theme-primary-text-emphasis: #8ed2ff;
    --theme-link-color: #57c1ff;
    --theme-link-hover-color: #8ed2ff;
}

/* ==========================================================================
   2) slate — Slate & Signal (정밀 계기판)
   그림자 0 · 헤어라인 · 고정폭 수치
   ========================================================================== */
html[data-theme='slate'] {
    --brand-blue: #0b7fe0;
    --brand-sky: #3aa0ef;
    --brand-blue-ui: #0b7fe0;
    --brand-gradient: linear-gradient(135deg, #0b7fe0 0%, #3aa0ef 100%);

    --theme-primary: #0b7fe0;
    --theme-primary-rgb: 11, 127, 224;
    --theme-primary-bg-subtle: #e6f1fc;
    --theme-primary-border-subtle: #b6d8f6;
    --theme-primary-text-emphasis: #08558f;
    --theme-link-color: #0b7fe0;
    --theme-link-hover-color: #08599b;

    --theme-body-bg: #f7f9fb;
    --theme-secondary-bg: #ffffff;
    --theme-tertiary-bg: #f1f5f9;
    --theme-border-color: #e3e9f0;
    --theme-body-color: #101720;
    --theme-secondary-color: #5b6673;
    --theme-sidenav-bg: #16202b;

    /* 3계열 — 전항목 PASS (CVD 11.8 / 정상 18.0) */
    --chart-done: #12a594;
    --chart-wip: #0b7fe0;
    --chart-delay: #d4553a;
    --chart-alt: #b8860b;

    --lt-1: #d3e6f7;
    --lt-2: #93c3e8;
    --lt-3: #3f92d4;
    --lt-4: #1a639f;
    --lt-5: #0e3c66;
    --lt-text-1: #0e3c66;
    --lt-text-2: #0e3c66;
    --lt-text-3: #ffffff;
    --lt-text-4: #ffffff;
    --lt-text-5: #ffffff;

    --dash-radius: 5px;
    /* 수치를 고정폭으로 — 자리수가 흔들리지 않는다 */
    --dash-num-font: 'Cascadia Mono', Consolas, monospace;
    --dash-num-weight: 600;
    --dash-num-ls: -0.01em;
}
html[data-theme='slate'][data-bs-theme='dark'] {
    --theme-primary: #3aa0ef;
    --theme-primary-rgb: 58, 160, 239;
    --theme-body-bg: #10161d;
    --theme-secondary-bg: #171f28;
    --theme-tertiary-bg: #1d2731;
    --theme-border-color: #26313d;
    --theme-body-color: #e4eaf1;
    --theme-secondary-color: #8b98a7;
    --theme-primary-bg-subtle: #12283a;
    --theme-primary-border-subtle: #1d4a6b;
    --theme-link-color: #6bb8f4;
}

/* ==========================================================================
   3) harbor — Deep Harbor (관제실 다크)
   다크가 본체. light 는 창백한 항구톤.
   ========================================================================== */
html[data-theme='harbor'] {
    --brand-blue: #2196d4;
    --brand-sky: #35c2ff;
    --brand-blue-ui: #1b7cb4;
    --brand-gradient: linear-gradient(135deg, #1b7cb4 0%, #35c2ff 100%);

    --theme-primary: #1b7cb4;
    --theme-primary-rgb: 27, 124, 180;
    --theme-primary-bg-subtle: #e4f1f9;
    --theme-primary-border-subtle: #aed6ea;
    --theme-primary-text-emphasis: #11526f;
    --theme-link-color: #1b7cb4;
    --theme-link-hover-color: #135c86;

    --theme-body-bg: #eef4f9;
    --theme-secondary-bg: #ffffff;
    --theme-tertiary-bg: #e4edf5;
    --theme-border-color: #d5e2ec;
    --theme-body-color: #0f1c28;
    --theme-secondary-color: #5a6c7d;
    --theme-sidenav-bg: #0b1622;

    --chart-done: #128f74;
    --chart-wip: #1b7cb4;
    --chart-delay: #c2455e;
    --chart-alt: #b07714;

    --lt-1: #cfe6f2;
    --lt-2: #8dc4dd;
    --lt-3: #3d97bd;
    --lt-4: #1c6787;
    --lt-5: #0e3e54;
    --lt-text-1: #0e3e54;
    --lt-text-2: #0e3e54;
    --lt-text-3: #ffffff;
    --lt-text-4: #ffffff;
    --lt-text-5: #ffffff;

    --dash-radius: 9px;
    --dash-num-font: Pretendard, 'Noto Sans KR', sans-serif;
    --dash-num-weight: 300;
    --dash-num-ls: -0.03em;
}
html[data-theme='harbor'][data-bs-theme='dark'] {
    --theme-primary: #35c2ff;
    --theme-primary-rgb: 53, 194, 255;
    --theme-body-bg: #0b1622;
    --theme-secondary-bg: #121d2b;
    --theme-tertiary-bg: #17263a;
    --theme-border-color: #1f2e40;
    --theme-body-color: #e7eef6;
    --theme-secondary-color: #8798ac;
    --theme-primary-bg-subtle: #0f2a3d;
    --theme-primary-border-subtle: #1c4d70;
    --theme-link-color: #6ed2ff;

    /* 다크 전용 — 전항목 PASS (CVD ΔE 17.6 / 정상 20.7) */
    --chart-done: #5fd3ae;
    --chart-wip: #2196d4;
    --chart-delay: #c2455e;
    --chart-alt: #c9891f;

    --lt-1: #0e3e54;
    --lt-2: #1c6787;
    --lt-3: #3d97bd;
    --lt-4: #8dc4dd;
    --lt-5: #cfe6f2;
    --lt-text-1: #ffffff;
    --lt-text-2: #ffffff;
    --lt-text-3: #ffffff;
    --lt-text-4: #0e3e54;
    --lt-text-5: #0e3e54;
}

/* ==========================================================================
   4) terra — Terra Calm (따뜻한 중립)
   ========================================================================== */
html[data-theme='terra'] {
    --brand-blue: #1d6fa8;
    --brand-sky: #4a93c4;
    --brand-blue-ui: #1d6fa8;
    --brand-gradient: linear-gradient(135deg, #1d6fa8 0%, #4a93c4 100%);

    --theme-primary: #1d6fa8;
    --theme-primary-rgb: 29, 111, 168;
    --theme-primary-bg-subtle: #e8f0f7;
    --theme-primary-border-subtle: #b9d4e7;
    --theme-primary-text-emphasis: #144a71;
    --theme-link-color: #1d6fa8;
    --theme-link-hover-color: #144a71;

    --theme-body-bg: #f1ede6;
    --theme-secondary-bg: #ffffff;
    --theme-tertiary-bg: #eae4d9;
    --theme-border-color: #e0d9cf;
    --theme-body-color: #23201c;
    --theme-secondary-color: #6e675e;
    --theme-sidenav-bg: #2b2621;

    /* 3계열 — 전항목 PASS (CVD ΔE 16.8 / 정상 23.5)
       ⚠ 초록(#5faa62) 은 흰 배경 대비 2.83:1 → 값 라벨이 붙는 곳에만 쓴다 */
    --chart-done: #5faa62;
    --chart-wip: #1d6fa8;
    --chart-delay: #9e3f36;
    --chart-alt: #d29112;

    --lt-1: #e3ddd0;
    --lt-2: #c9b894;
    --lt-3: #a8905f;
    --lt-4: #7d6840;
    --lt-5: #4e4128;
    --lt-text-1: #4e4128;
    --lt-text-2: #4e4128;
    --lt-text-3: #ffffff;
    --lt-text-4: #ffffff;
    --lt-text-5: #ffffff;

    --dash-radius: 7px;
    --dash-num-font: Pretendard, 'Noto Sans KR', sans-serif;
    --dash-num-weight: 700;
    --dash-num-ls: -0.025em;
}
html[data-theme='terra'][data-bs-theme='dark'] {
    --theme-primary: #6aa9d4;
    --theme-primary-rgb: 106, 169, 212;
    --theme-body-bg: #1b1815;
    --theme-secondary-bg: #24211d;
    --theme-tertiary-bg: #2c2823;
    --theme-border-color: #332e28;
    --theme-body-color: #ece7df;
    --theme-secondary-color: #a09789;
    --theme-primary-bg-subtle: #1c2a35;
    --theme-primary-border-subtle: #33505f;
    --theme-link-color: #8cc0e4;

    --chart-done: #7cc47f;
    --chart-wip: #6aa9d4;
    --chart-delay: #d4665a;
    --chart-alt: #dda63a;
}

/* ==========================================================================
   5) editorial — Editorial Grid (타이포 중심)
   색 최소 · 여백이 위계 · 강조색은 활성 상태에만
   ========================================================================== */
html[data-theme='editorial'] {
    --brand-blue: #0d8bff;
    --brand-sky: #4aa8ff;
    --brand-blue-ui: #0d6fd1;
    --brand-gradient: linear-gradient(135deg, #0d6fd1 0%, #4aa8ff 100%);

    --theme-primary: #0d6fd1;
    --theme-primary-rgb: 13, 111, 209;
    --theme-primary-bg-subtle: #eaf2fd;
    --theme-primary-border-subtle: #bcd8f6;
    --theme-primary-text-emphasis: #094a8e;
    --theme-link-color: #0d6fd1;
    --theme-link-hover-color: #094a8e;

    --theme-body-bg: #ffffff;
    --theme-secondary-bg: #ffffff;
    --theme-tertiary-bg: #fafaf9;
    --theme-border-color: #e5e5e2;
    --theme-body-color: #0f0f0f;
    --theme-secondary-color: #6b6b6b;
    --theme-sidenav-bg: #17171a;

    /* 색을 최소로 — 상태는 무채 3단 + 지연만 유채색으로 경고 */
    --chart-done: #33332f;
    --chart-wip: #0d6fd1;
    --chart-delay: #b3392f;
    --chart-alt: #8c8c86;

    --lt-1: #e2e2df;
    --lt-2: #b9b9b4;
    --lt-3: #8c8c86;
    --lt-4: #5c5c57;
    --lt-5: #2e2e2b;
    --lt-text-1: #2e2e2b;
    --lt-text-2: #2e2e2b;
    --lt-text-3: #ffffff;
    --lt-text-4: #ffffff;
    --lt-text-5: #ffffff;

    --dash-radius: 0px;
    --dash-num-font: Pretendard, 'Noto Sans KR', sans-serif;
    --dash-num-weight: 800;
    --dash-num-ls: -0.045em;
}
html[data-theme='editorial'][data-bs-theme='dark'] {
    --theme-primary: #4aa8ff;
    --theme-primary-rgb: 74, 168, 255;
    --theme-body-bg: #0f0f0f;
    --theme-secondary-bg: #171716;
    --theme-tertiary-bg: #1e1e1c;
    --theme-border-color: #292927;
    --theme-body-color: #f2f2f0;
    --theme-secondary-color: #9a9a96;
    --theme-primary-bg-subtle: #10243a;
    --theme-primary-border-subtle: #1f4266;
    --theme-link-color: #7bc0ff;

    --chart-done: #d6d6d1;
    --chart-wip: #4aa8ff;
    --chart-delay: #e0685c;
    --chart-alt: #8c8c86;
}

/* ==========================================================================
   라이트 대비 상향  [LIGHT-CONTRAST-V1]
   ─────────────────────────────────────────────────────────────────────────
   사용자 지적: "화면 밝기가 화이트일 때 외곽라인·폰트가 너무 흐려서 불편하다."
   AnywhereMD(md.ironman.im)에서 같은 신고를 받고 정리한 톤을 그대로 가져온다.

   ── 실측 (2026-08-31, 흰 카드 #fff 위, 알파 합성 후) ──
     --theme-emphasis-color   rgba(76,76,92,.75)  4.31  ← AA 4.5 미달
     --theme-tertiary-color   rgba(76,76,92,.5)   2.43  ← 심각
     --theme-secondary-color  signature #9ba6b7   2.46  ← 심각 (이 테마만)
                              slate 5.84 / harbor 5.42 / terra 5.58 / editorial 5.33 → 통과
   다크는 5.11~6.35 로 전부 통과 → **손대지 않는다.**

   ⚠⚠ **글자색만 올린다. 테두리는 건드리지 않는다.**
     AnywhereMD 에서 `--theme-border-color` 도 함께 올렸다가(#e7e9eb→#868c98)
     입력칸·선택상자·카드 테두리가 전부 도드라져 화면이 답답해졌고,
     사용자가 "테두리는 원래대로 돌려줘" 라고 해서 되돌린 이력이 있다.
     → 테두리를 진하게 하는 것은 고대비 옵션의 몫이다. 여기서는 벤더 기본값을 쓴다.

   ⚠⚠ **반드시 `[data-bs-theme='light']` 로 밝기를 한정한다.**
     `html[data-theme='signature']` 블록에는 밝기 구분이 없어서, 거기에 넣으면
     라이트용 진한 회색이 **다크에도 그대로 적용**된다.
     AnywhereMD 에서 실제로 그렇게 만들었다가 다크 9개 항목이 2.53~3.19 로 무너졌다.

   ⚠ 값은 눈대중이 아니라 AnywhereMD 에서 실제 배경 위에서 재서 고른 것을 그대로 쓴다.
     "기준을 넘되 편안한" 선이다 — 더 진하게 올리면 화면이 답답해진다.
   ========================================================================== */

/* 라이트 공통 — tertiary·emphasis 는 5개 테마 모두 벤더 기본(반투명)이라 함께 올린다.
   반투명을 불투명 값으로 바꾼다: 알파는 배경이 바뀌면 대비가 같이 흔들린다. */
html[data-bs-theme='light'] {
    --theme-tertiary-color: #6a7280; /* 2.43 → 5.0 대 */
    --theme-emphasis-color: #2b2f3a; /* 4.31 → 12 대 */
}

/* signature(기본 테마)만 보조글자가 벤더 기본(#9ba6b7)이라 2.46 이다.
   나머지 4개 테마는 자기 값이 이미 5.3 이상이라 덮지 않는다 —
   덮어버리면 terra 의 따뜻한 회색 같은 테마 고유의 톤이 사라진다. */
html[data-theme='signature'][data-bs-theme='light'] {
    --theme-secondary-color: #5f6673; /* 2.46 → 5.4 대 */
}

/* ==========================================================================
   테마가 바꾸는 모양·타이포를 실제 컴포넌트에 연결
   (색은 위 변수가 Inspinia 토큰을 덮으므로 자동 반영된다)
   ========================================================================== */
/* 카드 라운드 */
#dashGrid > [class*='col'] > .card,
.filter-card,
.kpi-card {
    border-radius: var(--dash-radius, 6px);
}
/* KPI 수치 — 테마별 글꼴·굵기·자간 */
.kpi-card h3 {
    font-family: var(--dash-num-font, inherit);
    font-weight: var(--dash-num-weight, 700);
    letter-spacing: var(--dash-num-ls, -0.02em);
}
/* slate·editorial 은 그림자를 쓰지 않는다(정밀·절제) */
html[data-theme='slate'] .card,
html[data-theme='editorial'] .card {
    box-shadow: none;
}

/* ── 테마 선택 드롭다운 ── */
.theme-menu {
    min-width: 268px;
    padding: 6px;
}
.theme-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--theme-body-color);
}
.theme-item:hover {
    background: var(--theme-tertiary-bg, rgba(0, 0, 0, 0.04));
}
.theme-item.active {
    background: var(--theme-primary-bg-subtle);
}
.theme-item .tm-sw {
    display: flex;
    gap: 3px;
    flex: none;
}
.theme-item .tm-sw i {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.theme-item .tm-tx {
    min-width: 0;
    line-height: 1.25;
}
.theme-item .tm-nm {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
}
.theme-item .tm-ds {
    display: block;
    font-size: 0.6875rem;
    color: var(--theme-secondary-color);
}
.theme-item .tm-ck {
    margin-left: auto;
    flex: none;
    color: var(--theme-primary);
    opacity: 0;
}
.theme-item.active .tm-ck {
    opacity: 1;
}

/* ==========================================================================
   테마별 범주 팔레트 (요청구분 7종 · 진행상태 8종)  [PALETTE-BLOCK-V3]

   왜 테마마다 따로 두는가: :root 에만 있으면 테마를 바꿔도 이 두 위젯의 색이
   그대로여서 "테마가 안 먹는" 것처럼 보인다. 색상 가족(hue)을 테마별로 다르게
   큐레이션해 성격을 만든다 — signature=블루·시안, slate=절제된 한랭+라벤더,
   harbor=아쿠아+모래, terra=테라코타·황토, editorial=남색·자주.

   ⚠ v1 폐기 이유 (dataviz 스킬 공식 검증기로 재검증해서 발견)
     v1 은 자작 검증기로 "all-pairs 4시야 최소 ΔE" 만 최대화했다. 수치 자체는 공식
     검증기와 일치했지만 **임계값 판정을 하지 않았다**. 공식 기준으로는 adjacent
     **4/20 PASS** 였다: 다크 명도 밴드 위반 10/10(공식 dark L 0.48~0.67 인데 0.62~0.86 을
     썼다 — "어두운 배경이라 밝게" 라는 판단이 기준과 어긋났다), 채도 floor 위반 8건
     (게이머 클리핑 후 C 미확인), 그리고 스택 바·막대에 적용되는 **adjacent** 기준 미검사.

   ⚠ v2 폐기 이유
     공식 기준은 통과했지만(20/20), 통과 조합을 찾느라 시드를 옮겨 탐색한 결과
     **시그니처 테마 light 팔레트에서 청색 계열이 아예 빠졌다**(계열: 분홍·황·주·청록·
     자·남·초). 브랜드 블루 테마인데 브랜드색이 없는 팔레트가 됐다.

   v3 기준 = 공식 검증기와 동일 + 브랜드 앵커 고정 (tools/gen4.js 가 검증기를 직접 호출)
     명도  light L 0.43~0.77 / dark L 0.48~0.67   (안쪽 여유: 0.46~0.74 / 0.50~0.66)
     채도  C >= 0.10 — 게이머 클리핑 **후** 실측값으로 확인
     CVD   인접쌍 min(protan,deutan) ΔE >= 8.0
     정상  인접쌍 ΔE >= 15 (하드 게이트)
     앵커  각 테마·밝기의 `--theme-primary` 색상대(±22°) 색을 **1번 자리에 고정**.
           themes.css 의 primary 를 읽어 계산하므로 테마 색을 바꾸면 따라온다.
     순서  앵커를 1번에 두고 나머지를 **완전탐색**해 인접 최소 ΔE 최대화

   검증 결과: **공식 검증기 adjacent 기준 20/20 PASS · 앵커 20/20 포함(전부 1번)**
     인접 CVD 13.5~24.4 (기준 8.0) · 인접 정상시야 17.8~30.2 (기준 15)
     앵커를 1번에 고정하면서 최저 CVD 가 15.6 → 13.5 로 내려갔지만 기준의 1.7배 이상이다.
   잔여 항목은 'Contrast vs surface: relief' 뿐 — 표면 대비 3:1 미달 색이 있어 2차
   인코딩이 필수인데, 이 위젯들은 **범례 + 툴팁 + 숫자**를 모두 갖고 있어 충족된다.

   ⚠ all-pairs(산점도·맵용 엄격 기준)로는 통과하지 못한다 — 8범주에서는 구조적으로
     어렵고, 스택 바·막대·라인에는 적용되지 않는 기준이다. 산점도를 추가하면 그때
     범주 수를 줄이거나 별도 팔레트를 만들어야 한다.

   재생성·재검증: tools/gen4.js (공식 검증기를 합격 기준으로 직접 호출)
   ========================================================================== */

/* signature / light — 공식 검증(adjacent): stage PASS CVD 22.7 정상 23.8 · fg PASS CVD 21.0 정상 21.8 */
html[data-theme='signature'] {
    --fg-1: #0c8ffc;
    --fg-2: #ff8342;
    --fg-3: #d556b2;
    --fg-4: #a80014;
    --fg-5: #00c3c5;
    --fg-6: #6b30af;
    --fg-7: #008854;
    --stage-1: #0c8ffc;
    --stage-2: #d5a200;
    --stage-3: #00baf9;
    --stage-4: #e36100;
    --stage-5: #6b30af;
    --stage-6: #00ca7f;
    --stage-7: #a80014;
    --stage-8: #d556b2;
}

/* signature / dark — 공식 검증(adjacent): stage PASS CVD 17.9 정상 19.6 · fg PASS CVD 16.2 정상 20.4 */
html[data-theme='signature'][data-bs-theme='dark'] {
    --fg-1: #1e94ff;
    --fg-2: #b53795;
    --fg-3: #b78b00;
    --fg-4: #00a7a9;
    --fg-5: #b71920;
    --fg-6: #763ebd;
    --fg-7: #008854;
    --stage-1: #1e94ff;
    --stage-2: #b71920;
    --stage-3: #009fd6;
    --stage-4: #b78b00;
    --stage-5: #c849a5;
    --stage-6: #d15800;
    --stage-7: #763ebd;
    --stage-8: #00ae6d;
}

/* slate / light — 공식 검증(adjacent): stage PASS CVD 24.4 정상 25.7 · fg PASS CVD 22.5 정상 30.2 */
html[data-theme='slate'] {
    --fg-1: #2d48c0;
    --fg-2: #c9341b;
    --fg-3: #00bceb;
    --fg-4: #93147f;
    --fg-5: #c8a900;
    --fg-6: #8c75f9;
    --fg-7: #00a86e;
    --stage-1: #2d48c0;
    --stage-2: #a31900;
    --stage-3: #00ca85;
    --stage-4: #0091f8;
    --stage-5: #877100;
    --stage-6: #00bceb;
    --stage-7: #fb8900;
    --stage-8: #d258b9;
}

/* slate / dark — 공식 검증(adjacent): stage PASS CVD 18.1 정상 18.8 · fg PASS CVD 21.2 정상 23.4 */
html[data-theme='slate'][data-bs-theme='dark'] {
    --fg-1: #3655cd;
    --fg-2: #008858;
    --fg-3: #9079fe;
    --fg-4: #b61e00;
    --fg-5: #00a1ca;
    --fg-6: #ab9100;
    --fg-7: #a0268b;
    --stage-1: #3655cd;
    --stage-2: #f05940;
    --stage-3: #a0268b;
    --stage-4: #998100;
    --stage-5: #8068eb;
    --stage-6: #944e00;
    --stage-7: #0095fe;
    --stage-8: #009785;
}

/* harbor / light — 공식 검증(adjacent): stage PASS CVD 20.2 정상 21.6 · fg PASS CVD 20.9 정상 22.5 */
html[data-theme='harbor'] {
    --fg-1: #0095e7;
    --fg-2: #ff8526;
    --fg-3: #00bee5;
    --fg-4: #00885c;
    --fg-5: #732ca9;
    --fg-6: #a80009;
    --fg-7: #dc53a2;
    --stage-1: #0095e7;
    --stage-2: #ff8526;
    --stage-3: #dc53a2;
    --stage-4: #a80009;
    --stage-5: #00c2ca;
    --stage-6: #976800;
    --stage-7: #732ca9;
    --stage-8: #00885c;
}

/* harbor / dark — 공식 검증(adjacent): stage PASS CVD 15.8 정상 21.8 · fg PASS CVD 17.3 정상 24.2 */
html[data-theme='harbor'][data-bs-theme='dark'] {
    --fg-1: #009aed;
    --fg-2: #007650;
    --fg-3: #7f3ab6;
    --fg-4: #b71a18;
    --fg-5: #00a2c5;
    --fg-6: #c08600;
    --fg-7: #ce4596;
    --stage-1: #009aed;
    --stage-2: #007650;
    --stage-3: #7f3ab6;
    --stage-4: #b15500;
    --stage-5: #00a6ad;
    --stage-6: #b71a18;
    --stage-7: #c08600;
    --stage-8: #bc3386;
}

/* terra / light — 공식 검증(adjacent): stage PASS CVD 19.1 정상 19.6 · fg PASS CVD 19.1 정상 19.7 */
html[data-theme='terra'] {
    --fg-1: #0094ec;
    --fg-2: #c8a900;
    --fg-3: #c62d61;
    --fg-4: #ff7e79;
    --fg-5: #5939b9;
    --fg-6: #00c7a0;
    --fg-7: #a46000;
    --stage-1: #0094ec;
    --stage-2: #e85b0f;
    --stage-3: #990b71;
    --stage-4: #00c7a0;
    --stage-5: #5939b9;
    --stage-6: #c8a900;
    --stage-7: #a7001c;
    --stage-8: #e74f7c;
}

/* terra / dark — 공식 검증(adjacent): stage PASS CVD 13.5 정상 17.8 · fg PASS CVD 17.1 정상 25.8 */
html[data-theme='terra'][data-bs-theme='dark'] {
    --fg-1: #0098f2;
    --fg-2: #b31553;
    --fg-3: #ab9100;
    --fg-4: #de59ae;
    --fg-5: #8f5300;
    --fg-6: #6346c7;
    --fg-7: #00987a;
    --stage-1: #0098f2;
    --stage-2: #ed5f18;
    --stage-3: #a6207d;
    --stage-4: #ec5480;
    --stage-5: #8f5300;
    --stage-6: #00987a;
    --stage-7: #6346c7;
    --stage-8: #ca3037;
}

/* editorial / light — 공식 검증(adjacent): stage PASS CVD 23.6 정상 25.6 · fg PASS CVD 19.0 정상 22.6 */
html[data-theme='editorial'] {
    --fg-1: #114cbf;
    --fg-2: #00ca85;
    --fg-3: #94127c;
    --fg-4: #eb5061;
    --fg-5: #d283ff;
    --fg-6: #9b6600;
    --fg-7: #00a0b1;
    --stage-1: #114cbf;
    --stage-2: #e49900;
    --stage-3: #15b8ff;
    --stage-4: #008858;
    --stage-5: #553aba;
    --stage-6: #ff7c84;
    --stage-7: #923800;
    --stage-8: #d457b6;
}

/* editorial / dark — 공식 검증(adjacent): stage PASS CVD 19.3 정상 24.4 · fg PASS CVD 16.5 정상 23.4 */
html[data-theme='editorial'][data-bs-theme='dark'] {
    --fg-1: #1e59cd;
    --fg-2: #875800;
    --fg-3: #00ad72;
    --fg-4: #a22488;
    --fg-5: #ec6107;
    --fg-6: #b869e5;
    --fg-7: #c92e46;
    --stage-1: #1e59cd;
    --stage-2: #00a99a;
    --stage-3: #875800;
    --stage-4: #6047c8;
    --stage-5: #00764c;
    --stage-6: #b869e5;
    --stage-7: #ec6107;
    --stage-8: #a22488;
}
