/* DDS(DNL Design System) 토큰 - greencar-uxd/dnl 레포 dds/tokens/{colors,typography,spacing,layout}.css 를 그대로 합친 것.
   값을 여기서 고치지 않는다. DDS 가 바뀌면 이 파일을 다시 받아 덮는다. (2026-12-01)
   앱 화면 index.html 은 오프라인 셸이라 이 파일을 부르지 않고 쓰는 값만 안에 옮겨 두었다. */
/* ============================================================
   Colors — Monochrome + a single accent
   Light is the base (:root). Dark overrides semantic tokens
   under [data-theme="dark"]. Raw ramps stay constant; only
   semantic aliases re-map per theme.

   System intent: INK (near-black) drives primary text & actions;
   the ACCENT (#2D5BFF) carries links, focus, selected/active,
   key highlights. Used sparingly on a monochrome base.
   ============================================================ */

:root {
  /* ---- Neutral ramp (cool-leaning gray) ---- */
  --gray-0:   #ffffff;
  --gray-50:  #f7f8f9;
  --gray-100: #eceef1;
  --gray-200: #dde0e5;
  --gray-300: #c5cad1;
  --gray-400: #9aa1ab;
  --gray-500: #6b727d;
  --gray-600: #4d535d;
  --gray-700: #383d45;
  --gray-800: #24282e;
  --gray-900: #14171b;
  --gray-950: #0c0e11;

  /* ---- Accent ramp (signature) ---- */
  --accent-50:  #eef2ff;
  --accent-100: #dde5ff;
  --accent-200: #bccbff;
  --accent-300: #93acff;
  --accent-400: #5e84ff;
  --accent-500: #2d5bff;
  --accent-600: #2447e0;
  --accent-700: #1f3bb8;
  --accent-800: #1c328f;
  --accent-900: #1a2d70;

  /* ---- Status ramps (cool-shifted 2026-08-19) ---- */
  --success-500: #0d9668;
  --success-600: #0a7a54;
  --success-700: #085f41; /* AA text on success-50 / white */
  --success-50:  #e2f6ed;
  --warning-500: #d9870b;
  --warning-600: #b56e08;
  --warning-700: #875106; /* AA text on warning-50 / white */
  --warning-50:  #fbf2df;
  --danger-500:  #d63a5f;
  --danger-600:  #b62450;
  --danger-700:  #931a3e; /* AA text on danger-50 / white */
  --danger-50:   #fbe8ee;

  /* ===== Semantic — LIGHT ===== */
  /* text */
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary:  var(--gray-500); /* was gray-400 (2.45:1); gray-500 = 4.56:1 AA */
  --text-inverse:   var(--gray-0);
  --text-link:      var(--accent-600);
  --text-accent:    var(--accent-600);

  /* surfaces */
  --surface-page:    var(--gray-50);
  --surface-card:    var(--gray-0);
  --surface-sunken:  var(--gray-100);
  --surface-raised:  var(--gray-0);
  --surface-inverse: var(--gray-900);
  --surface-accent-subtle: var(--accent-50);

  /* borders */
  --border:        var(--gray-200);
  --border-strong: var(--gray-300);
  --border-control: #868d97;        /* form-field boundary, ≥3:1 (WCAG 1.4.11) */
  --border-accent: var(--accent-500);

  /* accent — decorative (500) vs. solid/text-bearing (600, AA for white text) */
  --accent:             var(--accent-500);
  --accent-hover:       var(--accent-600);
  --accent-solid:       var(--accent-600);  /* fills with text/icon on top */
  --accent-solid-hover: var(--accent-700);
  --on-accent:          var(--gray-0);
  --focus-ring:         var(--accent-500);

  /* primary action (ink-forward) */
  --action-primary-bg:       var(--gray-900);
  --action-primary-bg-hover: var(--gray-800);
  --action-primary-fg:       var(--gray-0);

  /* status (semantic) */
  --info-500: var(--accent-500);
  --info-50:  var(--surface-accent-subtle);

  /* ---- Data-viz categorical palette (chart-1 = signature accent) ---- */
  --chart-1: var(--accent-500); /* @kind color */
  --chart-2: #0d9668; /* @kind color */
  --chart-3: #8b5cf6; /* @kind color */
  --chart-4: #d63a5f; /* @kind color */
  --chart-5: var(--accent-400); /* @kind color */
  --chart-6: #6b727d; /* @kind color */
}

/* ===== Semantic — DARK ===== */
[data-theme="dark"] {
  /* text */
  --text-primary:   #f3f4f6;
  --text-secondary: #9aa1ab;
  --text-tertiary:  #868d97; /* was #6b727d (3.66:1); #868d97 = 5.66:1 AA */
  --text-inverse:   var(--gray-900);
  --text-link:      var(--accent-300);
  --text-accent:    var(--accent-300);

  /* surfaces */
  --surface-page:    #0d0f12;
  --surface-card:    #16181d;
  --surface-sunken:  #1d2025;
  --surface-raised:  #1d2025;
  --surface-inverse: var(--gray-50);
  --surface-accent-subtle: color-mix(in srgb, var(--accent-400) 20%, var(--surface-card));

  /* borders */
  --border:        #262a30;
  --border-strong: #343943;
  --border-control: #5e6571;        /* form-field boundary, ≥3:1 on dark */
  --border-accent: var(--accent-400);

  /* accent (lifted steps for dark; ink text on the solid CTA) */
  --accent:             var(--accent-400);
  --accent-hover:       var(--accent-300);
  --accent-solid:       var(--accent-400);
  --accent-solid-hover: var(--accent-300);
  --on-accent:          #0d0f12;
  --focus-ring:         var(--accent-400);

  /* primary action (near-white ink on dark) */
  --action-primary-bg:       #f3f4f6;
  --action-primary-bg-hover: #ffffff;
  --action-primary-fg:       #0d0f12;

  /* status surfaces */
  --info-500:   var(--accent-400);
  --info-50:    var(--surface-accent-subtle);
  --success-50: #0e2d20;
  --warning-50: #2e2410;
  --danger-50:  #33101f;
}

/* ============================================================
   Typography tokens
   Family: Pretendard single family for everything (KO + EN, display → data).
   Base scale + semantic aliases. Sizes in px for predictable UI rendering.
   ============================================================ */

:root {
  /* ---- Families ---- */
  --font-display: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-text:    "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-title:   "League Gothic", "Anton", Impact, "Arial Narrow", sans-serif; /* 워드마크 · 큰 영문 제목 (2026-11-16) */
  --font-mono:    var(--font-text); /* single-family system — data/numeric role uses Pretendard with tabular-nums */

  /* ---- Weights (Pretendard axis 100–900) ---- */
  --fw-light:    300; /* @kind font */
  --fw-regular:  400; /* @kind font */
  --fw-medium:   500; /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold:     700; /* @kind font */

  /* ---- Size scale (px) ---- 10·12·14·16·20·24·28·32·36·40 */
  --fs-2xs:     10px;   /* overline, fine print */
  --fs-caption: 12px;   /* captions, meta */
  --fs-sm:      14px;   /* secondary UI, dense tables */
  --fs-base:    16px;   /* default body */
  --fs-lg:      20px;   /* lead body, large UI labels */
  --fs-h4:      24px;   /* card titles, h4 */
  --fs-h3:      28px;   /* section heads, h3 */
  --fs-h2:      32px;   /* page titles, h2 */
  --fs-h1:      36px;   /* h1 */
  --fs-display: 40px;   /* hero / display */
  --fs-display-lg: 40px;/* alias of display (back-compat) */

  /* ---- Line heights ---- */
  --lh-tight:   1.05;   /* @kind font */
  --lh-snug:    1.18;   /* @kind font */
  --lh-normal:  1.45;   /* @kind font */
  --lh-body:    1.6;    /* @kind font */
  --lh-relaxed: 1.72;   /* @kind font */

  /* ---- Letter spacing ---- */
  --ls-tighter: -0.035em; /* @kind font */
  --ls-tight:   -0.02em;  /* @kind font */
  --ls-snug:    -0.01em;  /* @kind font */
  --ls-normal:  0;        /* @kind font */
  --ls-wide:    0.04em;   /* @kind font */
  --ls-caps:    0.13em;   /* @kind font */

  /* ---- Semantic type aliases ---- */
  --text-display:   var(--fw-bold) var(--fs-display-lg)/var(--lh-tight) var(--font-display);
  --text-h1:        var(--fw-bold) var(--fs-h1)/var(--lh-snug) var(--font-display);
  --text-h2:        var(--fw-bold) var(--fs-h2)/var(--lh-snug) var(--font-display);
  --text-h3:        var(--fw-semibold) var(--fs-h3)/var(--lh-snug) var(--font-display);
  --text-h4:        var(--fw-semibold) var(--fs-h4)/var(--lh-snug) var(--font-display);
  --text-body-lg:   var(--fw-regular) var(--fs-lg)/var(--lh-body) var(--font-text);
  --text-body:      var(--fw-regular) var(--fs-base)/var(--lh-body) var(--font-text);
  --text-body-sm:   var(--fw-regular) var(--fs-sm)/var(--lh-normal) var(--font-text);
  --text-caption:   var(--fw-regular) var(--fs-caption)/var(--lh-normal) var(--font-text);
  --text-label:     var(--fw-semibold) var(--fs-sm)/var(--lh-normal) var(--font-text);
  --text-mono:      var(--fw-regular) var(--fs-sm)/var(--lh-normal) var(--font-mono);
}

/* ============================================================
   Spacing, radius, shadow, motion
   4px base grid.
   ============================================================ */

:root {
  /* ---- Spacing (4px grid) ---- */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* ---- Radius (4px grid) ---- */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* ---- Shadows (cool, soft) ---- */
  --shadow-xs: 0 1px 2px rgba(16,18,29,.05);
  --shadow-sm: 0 1px 2px rgba(16,18,29,.06), 0 1px 3px rgba(16,18,29,.04);
  --shadow-md: 0 2px 4px rgba(16,18,29,.05), 0 8px 16px -8px rgba(16,18,29,.12);
  --shadow-lg: 0 4px 8px rgba(16,18,29,.05), 0 20px 40px -16px rgba(16,18,29,.18);
  --shadow-xl: 0 8px 16px rgba(16,18,29,.06), 0 32px 64px -24px rgba(16,18,29,.24);

  /* ---- Motion ---- */
  --ease-out:    cubic-bezier(.2, .8, .2, 1); /* @kind other */
  --ease-in-out: cubic-bezier(.4, 0, .2, 1); /* @kind other */
  --dur-fast:   120ms; /* @kind other */
  --dur-base:   200ms; /* @kind other */
  --dur-slow:   320ms; /* @kind other */
}

/* ============================================================
   Layout — breakpoints, containers, gutters
   All values stay on the 4px grid (480·768·1024·1280 …).

   NOTE: CSS custom properties cannot be read inside an @media
   condition (e.g. `@media (min-width: var(--bp-md))` is invalid).
   So these --bp-* tokens are the single source of truth for
   reference / JS / container logic, and the SAME literals are
   mirrored in the @media queries of css/layout.css. If you change
   a breakpoint here, update the matching literal there.
   ============================================================ */

:root {
  /* ---- Breakpoints (min-width) ---- */
  --bp-sm:  480px;   /* large phone            */
  --bp-md:  768px;   /* tablet / split view    */
  --bp-lg:  1024px;  /* small laptop           */
  --bp-xl:  1280px;  /* desktop                */

  /* ---- Container max-widths ---- */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1200px;
  --container-max: 1200px;  /* default page container (web ≈ 1100–1240) */

  /* ---- Page side gutters (fluid by breakpoint) ---- */
  --gutter:    16px;   /* base / mobile */
  --gutter-md: 24px;   /* ≥ 768px       */
  --gutter-lg: 32px;   /* ≥ 1024px      */
}

