/* ChatG design tokens — shared by site.css and assets/chat/*.css.
   Theme: <html data-theme="light|dark"> is set before first paint by an inline script in <head>
   (stored choice in localStorage "chatg-theme" = light|dark|system; system follows prefers-color-scheme). */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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";
  src: url("/assets/fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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";
  src: url("/assets/fonts/geist-vietnamese-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/geist-vietnamese-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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";
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  color-scheme: light;
  /* brand */
  --indigo: #5B5BF6;
  --cyan: #22C3EE;
  --coral: #FF7A59;
  --ink: #0E0F14;

  /* surfaces */
  --bg: #FFFFFF;
  --bg-soft: #F6F7FB;
  --surface: #FFFFFF;
  --surface-2: #F1F2F8;
  --border: rgba(14, 15, 20, .09);
  --border-strong: rgba(14, 15, 20, .16);

  /* text */
  --text: #0E0F14;
  --text-soft: #3A3D4A;
  --muted: #6B6F80;

  /* accents */
  --accent: #5B5BF6;
  --accent-2: #22C3EE;
  --accent-ink: #4343D9;          /* accent text on light bg (AA contrast) */
  --accent-soft: rgba(91, 91, 246, .09);
  --accent-grad: linear-gradient(120deg, #5B5BF6 0%, #6E6BF7 35%, #22C3EE 100%);
  --on-accent: #FFFFFF;
  --success: #12A150;
  --danger: #E5484D;

  /* geometry */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* elevation */
  --shadow-sm: 0 1px 2px rgba(14, 15, 20, .05), 0 1px 1px rgba(14, 15, 20, .03);
  --shadow: 0 1px 2px rgba(14, 15, 20, .04), 0 6px 20px -6px rgba(14, 15, 20, .10);
  --shadow-lg: 0 2px 6px rgba(14, 15, 20, .04), 0 24px 60px -18px rgba(30, 32, 70, .22);
  --ring: 0 0 0 3px rgba(91, 91, 246, .35);

  /* type */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* layout */
  --header-h: 64px;
  --maxw: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0C10;
  --bg-soft: #101118;
  --surface: #13141B;
  --surface-2: #1A1C25;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .15);

  --text: #ECEDF3;
  --text-soft: #C3C6D4;
  --muted: #8C90A3;

  --accent: #7676FF;
  --accent-2: #3DD3F5;
  --accent-ink: #A5A5FF;
  --accent-soft: rgba(118, 118, 255, .14);
  --accent-grad: linear-gradient(120deg, #6B6BFA 0%, #7A78FF 35%, #2CCDF2 100%);
  --success: #3DD68C;
  --danger: #FF6369;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px -20px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(118, 118, 255, .45);
}

/* Scripts without Latin glyphs: system fonts first (Geist still covers Latin/digits via unicode-range). */
:lang(zh) { --font: "Geist", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", sans-serif; }
:lang(ja) { --font: "Geist", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif; }
:lang(ko) { --font: "Geist", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
:lang(th) { --font: "Geist", system-ui, -apple-system, "Leelawadee UI", "Thonburi", "Noto Sans Thai", sans-serif; }
:lang(ar), :lang(fa) { --font: system-ui, -apple-system, "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif; }
:lang(he) { --font: system-ui, -apple-system, "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew", Arial, sans-serif; }
:lang(hi) { --font: "Geist", system-ui, -apple-system, "Nirmala UI", "Kohinoor Devanagari", "Noto Sans Devanagari", sans-serif; }
:lang(bn) { --font: "Geist", system-ui, -apple-system, "Nirmala UI", "Kohinoor Bangla", "Noto Sans Bengali", sans-serif; }
:lang(el), :lang(ru), :lang(uk) { --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; }
