/* gbt.chat design tokens – "Paper": warm, editorial, literate. Cream paper, ink text, a terracotta accent, a serif
   display face (Playfair Display) with Inter for UI and body text, soft paper shadows, hairline warm borders.
   Light is the AI Chat app's "Paper" theme; dark ("warm night") is derived from it: warm charcoal, not blue-black.
   The theme follows the system unless the visitor picks Light or Dark (inline head script sets [data-theme]).
   Shared by the site (site.css) and the chat app (assets/chat/**). Fonts: self-hosted variable WOFF2 (SIL OFL,
   /assets/fonts/OFL-*.txt); Latin, Latin Ext, Cyrillic, Greek (Inter), Vietnamese. CJK / Indic / Arabic scripts use
   system stacks (see the :lang() rules below). */

@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/inter-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: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/inter-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: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/inter-greek-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/inter-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: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/inter-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: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/assets/fonts/inter-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: 'Playfair Display'; font-style: normal; font-display: swap; font-weight: 400 900; src: url(/assets/fonts/playfair-display-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: 'Playfair Display'; font-style: normal; font-display: swap; font-weight: 400 900; src: url(/assets/fonts/playfair-display-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: 'Playfair Display'; font-style: normal; font-display: swap; font-weight: 400 900; src: url(/assets/fonts/playfair-display-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: 'Playfair Display'; font-style: normal; font-display: swap; font-weight: 400 900; src: url(/assets/fonts/playfair-display-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: 'Playfair Display'; font-style: italic; font-display: swap; font-weight: 400 900; src: url(/assets/fonts/playfair-display-cyrillic-wght-italic.woff2) format('woff2-variations'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-display: swap; font-weight: 400 900; src: url(/assets/fonts/playfair-display-vietnamese-wght-italic.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: 'Playfair Display'; font-style: italic; font-display: swap; font-weight: 400 900; src: url(/assets/fonts/playfair-display-latin-ext-wght-italic.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: 'Playfair Display'; font-style: italic; font-display: swap; font-weight: 400 900; src: url(/assets/fonts/playfair-display-latin-wght-italic.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; }

/* ------------------------------------------------------------------ light ("Paper") */
:root {
  color-scheme: light;
  --bg: #F8F5EF;          /* paper */
  --surface: #FFFDF9;     /* cards, composer */
  --surface-2: #F0EADF;   /* wells, hovers, code */
  --drawer: #F3EEE5;      /* sheet / chat drawer */
  --bubble: #EFE7D9;      /* user message */
  --border: #E6DFD2;
  --border-2: #D9D0BF;    /* stronger hairline (inputs, focus-less outlines) */
  --text: #221E18;        /* ink */
  --text-2: #3F382E;
  --muted: #655D52;       /* body-size secondary text (AA on bg and surface) */
  --faint: #8B8274;       /* the mockup's muted: icons, large text, decoration only */
  --brand: #D2603A;       /* terracotta: numerals, accents, large type */
  --link: #A2462A;        /* terracotta for small text (AA) */
  --brand-soft: #FBECDF;
  --brand-wash: #FBE9DF;  /* CTA / upsell panels */
  --mark-fold: #EDB49B;   /* the folded corner of the logo */
  --accent: #221E18;      /* primary button: ink */
  --on-accent: #FFFDF9;
  --accent-hover: #3A332A;
  --success: #23743A;
  --warning: #B76E00;
  --danger: #C2392B;
  --bolt: #D2603A;
  --tint-blue-bg: #E8EEFB;  --tint-blue: #3B5BDB;
  --tint-rose-bg: #FBE7EA;  --tint-rose: #C2255C;
  --tint-clay-bg: #FBECDF;  --tint-clay: #B4502E;
  --tint-green-bg: #E3F3EA; --tint-green: #2B8A3E;
  --shadow-paper: 0 2px 10px rgba(80, 60, 30, .05);
  --shadow-lift: 0 10px 30px rgba(80, 60, 30, .10);
  --shadow-composer: 0 6px 24px rgba(80, 60, 30, .08);
  --scrim: rgba(34, 30, 24, .38);
  --code-bg: #F0EADF;
  --code-text: #3F382E;
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--link);

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Playfair Display', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --font-display: var(--font-serif);
  --font-wordmark: var(--font-serif);
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  --radius-composer: 20px;
  --radius-card: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
}

/* ------------------------------------------------------------------ dark ("warm night") */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1F1E1B;
  --surface: #2A2925;
  --surface-2: #33312C;
  --drawer: #25241F;
  --bubble: #3A3731;
  --border: #3D3A34;
  --border-2: #4A463F;
  --text: #F3EEE5;
  --text-2: #DDD6CA;
  --muted: #A79F92;
  --faint: #8E877B;
  --brand: #E07B55;
  --link: #EC8F6B;
  --brand-soft: rgba(224, 123, 85, .16);
  --brand-wash: #3A2C24;
  --mark-fold: #F2B79E;
  --accent: #F3EEE5;
  --on-accent: #1F1E1B;
  --accent-hover: #FFFFFF;
  --success: #6CC784;
  --warning: #E9A23B;
  --danger: #F07A6B;
  --bolt: #E07B55;
  --tint-blue-bg: rgba(91, 123, 240, .20);  --tint-blue: #A9B9FF;
  --tint-rose-bg: rgba(214, 64, 116, .20);  --tint-rose: #F5A3C0;
  --tint-clay-bg: rgba(224, 123, 85, .20);  --tint-clay: #F2A584;
  --tint-green-bg: rgba(64, 170, 92, .20);  --tint-green: #8FD6A1;
  --shadow-paper: 0 2px 10px rgba(0, 0, 0, .22);
  --shadow-lift: 0 12px 32px rgba(0, 0, 0, .36);
  --shadow-composer: 0 8px 28px rgba(0, 0, 0, .34);
  --scrim: rgba(10, 9, 8, .62);
  --code-bg: #26251F;
  --code-text: #E6DFD3;
}
/* no-JS visitors: follow the system */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #1F1E1B; --surface: #2A2925; --surface-2: #33312C; --drawer: #25241F; --bubble: #3A3731; --border: #3D3A34; --border-2: #4A463F;
    --text: #F3EEE5; --text-2: #DDD6CA; --muted: #A79F92; --faint: #8E877B; --brand: #E07B55; --link: #EC8F6B;
    --brand-soft: rgba(224, 123, 85, .16); --brand-wash: #3A2C24; --mark-fold: #F2B79E; --accent: #F3EEE5; --on-accent: #1F1E1B; --accent-hover: #FFFFFF;
    --tint-blue-bg: rgba(91, 123, 240, .20); --tint-blue: #A9B9FF; --tint-rose-bg: rgba(214, 64, 116, .20); --tint-rose: #F5A3C0;
    --tint-clay-bg: rgba(224, 123, 85, .20); --tint-clay: #F2A584; --tint-green-bg: rgba(64, 170, 92, .20); --tint-green: #8FD6A1;
    --shadow-paper: 0 2px 10px rgba(0, 0, 0, .22); --shadow-lift: 0 12px 32px rgba(0, 0, 0, .36); --shadow-composer: 0 8px 28px rgba(0, 0, 0, .34);
    --scrim: rgba(10, 9, 8, .62); --code-bg: #26251F; --code-text: #E6DFD3;
  }
}

/* scripts the webfonts do not cover: system stacks (the serif display face falls back to the same stack) */
:lang(zh) { --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; --font-serif: 'Songti SC', 'Noto Serif SC', 'SimSun', var(--font); }
:lang(ja) { --font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', Meiryo, 'Noto Sans JP', system-ui, sans-serif; --font-serif: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', var(--font); }
:lang(ko) { --font: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif; --font-serif: 'Noto Serif KR', 'Batang', var(--font); }
:lang(th) { --font: 'Leelawadee UI', Thonburi, 'Noto Sans Thai', system-ui, sans-serif; --font-serif: var(--font); }
:lang(hi) { --font: 'Nirmala UI', 'Kohinoor Devanagari', 'Noto Sans Devanagari', system-ui, sans-serif; --font-serif: var(--font); }
:lang(bn) { --font: 'Nirmala UI', 'Kohinoor Bangla', 'Noto Sans Bengali', system-ui, sans-serif; --font-serif: var(--font); }
:lang(ar) { --font: 'Segoe UI', 'Geeza Pro', 'Noto Sans Arabic', Tahoma, system-ui, sans-serif; --font-serif: 'Noto Naskh Arabic', 'Times New Roman', var(--font); }
:lang(fa) { --font: 'Segoe UI', 'Noto Sans Arabic', Tahoma, system-ui, sans-serif; --font-serif: 'Noto Naskh Arabic', var(--font); }
:lang(ur) { --font: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Segoe UI', Tahoma, system-ui, sans-serif; --font-serif: var(--font); }

/* the brand mark (inline SVG from cg_mark(); also on the chat page, which loads no site.css) */
.pa-mark { width: 28px; height: 28px; flex: none; display: block; }
.pa-mk-b { fill: var(--brand); }
.pa-mk-f { fill: var(--mark-fold); }
.gb-mark .pa-mk-b { fill: currentColor; }
.gb-mark .pa-mk-f { fill: currentColor; opacity: .5; }
