/* CPA:ON — navy and soft blue design tokens. */

:root {
  color-scheme: light;

  /* Brand */
  --ink: #0f172a;
  --ink-2: #17213a;
  --ink-3: #26324d;
  --lime: #dbeafe;
  --lime-press: #c9defd;
  --on-lime: #1e3a8a;

  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --on-blue: #ffffff;
  --blue-text: var(--blue);
  --blue-soft: #eff6ff;
  --blue-line: #bfdbfe;
  --app-status-bg: #0b2a5b;
  --logo-ink: var(--app-status-bg);
  --kakao-bg: #fee500;
  --kakao-hover: #f5dc00;
  --kakao-text: #191919;

  /* Surfaces */
  --bg: #ffffff;
  --surface: #f5f7fa;
  --surface-2: #e9eef4;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --scrim: rgba(14, 14, 16, 0.55);

  /* Text */
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #5b6b80;  /* UX Pro 점검: 옅은 면(#f5f7fa) 위 4.43 → 5.07:1 */
  --text-inverse: #f4f4f1;

  /* Status and condition labels */
  --warn: #dc2626;
  --warn-soft: #fef2f2;
  --on-warn: #ffffff;
  --green-rgb: 134, 188, 37;
  --caution: #92400e;
  --caution-soft: #fef3c7;
  --caution-meter: #d97706;
  --amber-text: #a14b00;
  --amber-soft: #fff4e5;
  --work-text: #7c3aed;
  --news-job-text: var(--blue-hover);
  --news-job-bg: #e8f0fe;
  --news-biz-text: var(--text-2);
  --news-biz-bg: #eef2f6;

  /* On-ink (hero band, primary buttons) */
  --on-ink: #f8fafc;
  --on-ink-2: #94a3b8;
  --hero-bg: #0f172a;
  --hero-line: #26324d;
  --hero-warn: #fca5a5;

  /* Focus */
  --focus: #2563eb;
  --focus-on-ink: #93c5fd;

  /* Typography */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --fs-display: clamp(38px, 4.4vw, 62px);
  --fs-h1: clamp(30px, 3.4vw, 46px);
  --fs-h2: 24px;
  --fs-h3: 18px;
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-xs: 12px;
  --fs-num: 44px;
  --lh-tight: 1.04;
  --lh-body: 1.62;
  --track-tight: -0.025em;
  --track-head: -0.02em;

  /* Spacing (4px grid) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 72px;
  --gutter: 32px;
  --maxw: 1280px;
  --hdr-h: 68px;
  --tabbar-h: 64px;
  --hit: 44px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-1: 0 1px 0 rgba(14, 14, 16, 0.04);
  --shadow-2: 0 14px 32px -16px rgba(14, 14, 16, 0.28);
  --shadow-pop: 0 30px 80px -24px rgba(14, 14, 16, 0.45), 0 0 0 1px rgba(14, 14, 16, 0.06);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 360ms;
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
    --hdr-h: 56px;
    --fs-num: 36px;
  }
}

/* 시스템 설정과 앱에서 선택한 다크 테마 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1114;
    --app-status-bg: var(--bg);
    --card: #191b1e;
    --surface: #202225;
    --surface-2: #292b2e;
    --sheet-bg: #26282b;
    --popover-bg: #313336;
    --line: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .19);
    --scrim: rgba(0, 0, 0, .65);
    --text: #eaeaea;
    --text-2: #b1b2b4;
    --text-3: #a0a2a5;
    --ink: #17191c;
    --ink-2: #202225;
    --ink-3: #35373a;
    --on-ink: var(--text);
    --on-ink-2: var(--text-2);
    --blue: #93b3e3;
    --blue-hover: #a9c4ea;
    --on-blue: #122034;
    --blue-text: #a7c6ef;
    --blue-soft: #252e3b;
    --blue-line: #414d60;
    --lime: var(--blue-soft);
    --lime-press: #333e50;
    --on-lime: var(--blue-text);
    --warn: #f0a09d;
    --warn-soft: #3c2729;
    --on-warn: #291719;
    --success-text: #a0cca9;
    --success-soft: #25372c;
    --hero-bg: var(--bg);
    --hero-line: var(--line);
    --focus: #a8c8f1;
    --logo-ink: var(--text);
    --caution: #e6c28d;
    --caution-soft: #3a3023;
    --amber-text: var(--caution);
    --amber-soft: var(--caution-soft);
    --work-text: #c4b5df;
    --news-job-text: var(--blue-text);
    --news-job-bg: var(--blue-soft);
    --news-biz-text: var(--text-2);
    --news-biz-bg: var(--surface-2);
    --shadow-1: none;
    --shadow-2: none;
    --shadow-pop: 0 0 0 1px var(--line);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1114;
  --app-status-bg: var(--bg);
  --card: #191b1e;
  --surface: #202225;
  --surface-2: #292b2e;
  --sheet-bg: #26282b;
  --popover-bg: #313336;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .19);
  --scrim: rgba(0, 0, 0, .65);
  --text: #eaeaea;
  --text-2: #b1b2b4;
  --text-3: #a0a2a5;
  --ink: #17191c;
  --ink-2: #202225;
  --ink-3: #35373a;
  --on-ink: var(--text);
  --on-ink-2: var(--text-2);
  --blue: #93b3e3;
  --blue-hover: #a9c4ea;
  --on-blue: #122034;
  --blue-text: #a7c6ef;
  --blue-soft: #252e3b;
  --blue-line: #414d60;
  --lime: var(--blue-soft);
  --lime-press: #333e50;
  --on-lime: var(--blue-text);
  --warn: #f0a09d;
  --warn-soft: #3c2729;
  --on-warn: #291719;
  --success-text: #a0cca9;
  --success-soft: #25372c;
  --hero-bg: var(--bg);
  --hero-line: var(--line);
  --focus: #a8c8f1;
  --logo-ink: var(--text);
  --caution: #e6c28d;
  --caution-soft: #3a3023;
  --amber-text: var(--caution);
  --amber-soft: var(--caution-soft);
  --work-text: #c4b5df;
  --news-job-text: var(--blue-text);
  --news-job-bg: var(--blue-soft);
  --news-biz-text: var(--text-2);
  --news-biz-bg: var(--surface-2);
  --shadow-1: none;
  --shadow-2: none;
  --shadow-pop: 0 0 0 1px var(--line);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 0ms;
    --dur-2: 0ms;
    --dur-3: 0ms;
  }
}

@media (max-width: 767px) {
  :root {
    --gap-related: var(--s2);
    --gap-group: var(--s4);
    --gap-section: var(--s5);
    --card-inset: var(--s4);
    --fs-action: 15px;
    --fs-secondary-action: 14px;
    --fs-control: 13px;
    --btn-h-primary: 44px;
    --btn-h-secondary: 38px;
    --chip-h: 32px;
    --fs-body: 15px;
    --lh-body: 1.55;
    --fs-h1: 22px;
    --fs-h2: 17px;
    --fs-h3: 16px;
    --fs-deadline: 30px;
    --gutter: var(--s4);
  }
}
