/* gpt.me design tokens – "Graphite": the design of our AI Chat app on the web (ai-chat-mobile/src/services/Theme).
   Soft dark, monochrome, a floating composer; the brand periwinkle/indigo only in small details. The theme follows the
   system unless the visitor picks Light or Dark. Shared by the site (site.css) and the chat app (assets/chat/**).
   The Graphite names (--raised, --bubble, --text-2 …) are the source of truth; the older names below them (--surface-2,
   --text-soft, --accent-ink …) are aliases kept for the chat styles. Fonts: Geist + Geist Mono, self-hosted variable
   WOFF2 (SIL OFL, /assets/fonts/OFL-Geist.txt); Latin, Cyrillic and Vietnamese are covered. */

@font-face { font-family: 'Geist'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-latin-wght-normal.woff2) format('woff2-variations'); 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-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-latin-ext-wght-normal.woff2) format('woff2-variations'); 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-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Geist'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-cyrillic-ext-wght-normal.woff2) format('woff2-variations'); 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-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-vietnamese-wght-normal.woff2) format('woff2-variations'); 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'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-mono-latin-wght-normal.woff2) format('woff2-variations'); 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-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-mono-latin-ext-wght-normal.woff2) format('woff2-variations'); 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-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-mono-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-mono-cyrillic-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/geist-mono-vietnamese-wght-normal.woff2) format('woff2-variations'); 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; }

/* Dark */
:root, [data-theme="dark"] {
  --bg: #131315;
  --surface: #1C1C1F;
  --raised: #232327;
  --bubble: #26262A;
  --border: #2E2E33;
  --border-subtle: #232327;
  --text: #F1F1F3;
  --text-2: #D4D4D8;
  --muted: #8D8D95;
  --placeholder: #6E6E76;
  --brand: #8B9CFF;
  --brand-soft: rgba(139, 156, 255, .14);
  --brand-line: rgba(139, 156, 255, .45);
  --pressed: #2A2A2F;
  --hover: #202024;
  /* primary button = "accent": text-coloured pill with bg-coloured text (white on dark), as in the app */
  --accent: #F1F1F3;
  --on-accent: #131315;
  --accent-hover: #FFFFFF;
  --success: #22A06B;
  --warning: #F07D26;
  --danger: #EF4444;
  --bolt: #F5B301;
  /* tile colours of the app's home action cards */
  --t1-bg: rgba(99, 140, 255, .16); --t1: #8AA4FF;
  --t2-bg: rgba(236, 72, 153, .16); --t2: #F472B6;
  --t3-bg: rgba(245, 158, 11, .16); --t3: #FBBF24;
  --t4-bg: rgba(16, 185, 129, .16); --t4: #34D399;
  --shadow-composer: 0 8px 30px rgba(0, 0, 0, .28);
  --scrim: rgba(0, 0, 0, .6);

  /* aliases (older names used by assets/chat/**) */
  --bg-soft: var(--surface);
  --surface-2: var(--raised);
  --border-strong: #3A3A40;
  --text-soft: var(--text-2);
  --accent-2: var(--brand);
  --accent-ink: var(--brand);
  --accent-soft: var(--brand-soft);
  --accent-grad: var(--accent);
  --teal: var(--brand);
  --teal-soft: var(--brand-soft);
  --coral: var(--warning);
  --coral-soft: rgba(240, 125, 38, .14);
  --horizon: none;
  --header-bg: var(--bg);
  --shadow-sm: none;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand);

  --r-pill: 999px;
  --r-composer: 26px;
  --r-card: 22px;
  --r-sm: 14px;
  --r-xs: 10px;
  --radius-sm: var(--r-xs);
  --radius: var(--r-sm);
  --radius-lg: var(--r-card);
  --radius-pill: var(--r-pill);

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --font-display: var(--font);
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace;

  --header-h: 60px;
  --maxw: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F4F4F5;
  --raised: #FFFFFF;
  --bubble: #F0F0F2;
  --border: #E4E4E7;
  --border-subtle: #EDEDF0;
  --text: #18181B;
  --text-2: #3F3F46;
  --muted: #6B6B73;             /* the app's #71717A, a step darker: AA for small text on the #F4F4F5 surface */
  --placeholder: #A1A1AA;
  --brand: #4F5FE8;
  --brand-soft: rgba(79, 95, 232, .09);
  --brand-line: rgba(79, 95, 232, .4);
  --pressed: #EBEBEE;
  --hover: #F7F7F8;
  --accent: #18181B;
  --on-accent: #FFFFFF;
  --accent-hover: #000000;
  --success: #177A50;
  --warning: #C25E12;
  --danger: #DC2626;
  --bolt: #D99A00;
  --t1-bg: #E8EEFB; --t1: #3B5BDB;
  --t2-bg: #FBE7EF; --t2: #C2255C;
  --t3-bg: #FBEEDC; --t3: #B4580F;
  --t4-bg: #E3F3EA; --t4: #2B8A3E;
  --shadow-composer: 0 6px 24px rgba(24, 24, 27, .08);
  --scrim: rgba(9, 9, 11, .35);

  --border-strong: #D4D4D8;
  --coral-soft: #FBEEDC;
  --shadow: 0 1px 2px rgba(24, 24, 27, .05);
  --shadow-lg: 0 16px 40px -14px rgba(24, 24, 27, .22);

  color-scheme: light;
}

/* Scripts without a bundled webfont: system stacks. */
:lang(zh) { --font: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans CJK SC', sans-serif; }
:lang(ja) { --font: system-ui, -apple-system, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', 'Noto Sans JP', sans-serif; }
:lang(ko) { --font: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif; }
:lang(th) { --font: system-ui, -apple-system, 'Leelawadee UI', 'Thonburi', 'Noto Sans Thai', 'Tahoma', sans-serif; }
:lang(ar) { --font: system-ui, -apple-system, 'Segoe UI', 'Geeza Pro', 'Noto Sans Arabic', 'Tahoma', sans-serif; }
:lang(fa) { --font: system-ui, -apple-system, 'Segoe UI', 'Noto Sans Arabic', 'Vazirmatn', 'Tahoma', sans-serif; }
:lang(ur) { --font: 'Noto Nastaliq Urdu', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Arabic', 'Tahoma', sans-serif; }
:lang(hi) { --font: system-ui, -apple-system, 'Nirmala UI', 'Kohinoor Devanagari', 'Noto Sans Devanagari', sans-serif; }
:lang(bn) { --font: system-ui, -apple-system, 'Nirmala UI', 'Kohinoor Bangla', 'Noto Sans Bengali', sans-serif; }
:lang(zh), :lang(ja), :lang(ko), :lang(th), :lang(ar), :lang(fa), :lang(ur), :lang(hi), :lang(bn) { --font-display: var(--font); }
/* Korean wraps between words (spaces), not between syllables. */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
