/* ============================================================================
 * ChatTutor — design tokens
 * ----------------------------------------------------------------------------
 * TRANSCRIBED 1:1 from fe/src/main.css. Do not hand-tune these values.
 * When the repo changes, re-transcribe — do not reinterpret.
 *
 * Source of truth: fe/src/main.css (@theme, @theme inline, :root, .dark)
 * Product: ChatTutor · Company: HumanThinking
 * Stack: Vue 3 + shadcn-vue (new-york, neutral base) + Tailwind v4 + Reka UI
 * ============================================================================ */

@import url("./primitives.css");
@import url("./composites.css");

/* ---------------------------------------------------------------------------
 * Fonts
 * The repo loads Inter Variable via `@fontsource-variable/inter`. We register
 * the static Inter faces shipped in fonts/ under the same family name so the
 * design system works offline. Weights 300–900 are covered; 300 is the
 * product's default body weight (see --font-weight-normal below).
 * ------------------------------------------------------------------------- */

@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/Inter_18pt-Light.ttf") format("truetype"); }
@font-face { font-family: "Inter Variable"; font-style: italic; font-weight: 300; font-display: swap; src: url("fonts/Inter_18pt-LightItalic.ttf") format("truetype"); }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter_18pt-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter_18pt-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter_18pt-SemiBold.ttf") format("truetype"); }
/* ---------------------------------------------------------------------------
 * @theme  — from fe/src/main.css
 * ------------------------------------------------------------------------- */

:root {
  --font-sans: "Inter Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-weight-normal: 300;

  /* 11px — half-step below Tailwind's text-xs (0.75rem / 12px) */
  --text-2xs: 0.6875rem;
  --text-2xs--line-height: 1rem;

  /* Tailwind's own type scale, spelled out for non-Tailwind consumers */
  --text-xs: 0.75rem;    --text-xs--line-height: 1rem;
  --text-sm: 0.875rem;   --text-sm--line-height: 1.25rem;
  --text-base: 1rem;     --text-base--line-height: 1.5rem;
  --text-lg: 1.125rem;   --text-lg--line-height: 1.75rem;
  --text-xl: 1.25rem;    --text-xl--line-height: 1.75rem;
  --text-2xl: 1.5rem;    --text-2xl--line-height: 2rem;
  --text-3xl: 1.875rem;  --text-3xl--line-height: 2.25rem;
  --text-4xl: 2.25rem;   --text-4xl--line-height: 2.5rem;

  /* 4px spacing base — Tailwind default, referenced by alert's grid-cols calc */
  --spacing: 0.25rem;
}

/* ---------------------------------------------------------------------------
 * @theme inline  — radii are derived, never hard-coded
 * ------------------------------------------------------------------------- */

:root {
  --radius: 0.625rem;                         /* 10px */
  --radius-sm: calc(var(--radius) - 4px);     /* 6px  */
  --radius-md: calc(var(--radius) - 2px);     /* 8px  */
  --radius-lg: var(--radius);                 /* 10px */
  --radius-xl: calc(var(--radius) + 4px);     /* 14px */

  /* Brand — indigo-600. Used by --border-focus and the `brand` variants
     of Button/Badge. NOT the default `primary`. */
  --color-brand: oklch(0.511 0.262 276.966);  /* indigo-600 · #4f46e5 */
  --color-indigo-600: oklch(0.511 0.262 276.966);
  --color-indigo-700: oklch(0.457 0.24 277.023);
}

/* ---------------------------------------------------------------------------
 * :root  — light theme, verbatim from fe/src/main.css
 * ------------------------------------------------------------------------- */

:root {
  --background: oklch(1 0 0);
  --brand: var(--color-brand);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.93 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.93 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --border-strong: oklch(0.8 0 0);
  --border-focus: var(--color-brand);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);

  /* Alert `warning` variant reaches for raw Tailwind yellows */
  --yellow-50: oklch(0.987 0.026 102.212);
  --yellow-200: oklch(0.945 0.129 101.54);
  --yellow-300: oklch(0.905 0.182 98.111);
  --yellow-800: oklch(0.476 0.114 61.907);

  /* Shadows — Tailwind defaults, the only two the repo uses */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ---------------------------------------------------------------------------
 * .dark  — verbatim from fe/src/main.css. Note: the repo toggles a `.dark`
 * class (see @custom-variant dark), not a data-attribute.
 * ------------------------------------------------------------------------- */

.dark {
  --background: oklch(0.145 0 0);
  --brand: var(--color-brand);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --border-strong: oklch(1 0 0 / 20%);
  --border-focus: var(--color-brand);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.556 0 0);
}

/* ---------------------------------------------------------------------------
 * @layer base  — from fe/src/main.css
 * ------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }

html, body { height: 100%; margin: 0; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);   /* 300 — the product runs Light */
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--foreground); text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
a:hover { color: var(--foreground); text-decoration-line: underline; }

/* @utility scrollbar-hide */
.scrollbar-hide { scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Buttons that are links keep no underline on hover. The generated scpN hover classes are
   numbered per page (scp2 means different things on different pages), so new markup uses
   this rule instead of an scpN class. */
a.ct-btn:hover { text-decoration: none; }

/* The desktop menu does not fit in this language at this width (site.js fitNav): use the
   menu button, as on a narrow screen. */
html.nav-compact [data-r="nav-desktop"] { display: none !important; }
html.nav-compact [data-r="nav-toggle"] { display: inline-flex !important; }

/* The header's trial button has a long and a short label; the short one is used when the
   long one would push the menu out of the header row (site.js fitNav). */
.zy-trial-short { display: none; }
html.nav-short [data-r="nav-desktop"] .zy-trial-full { display: none; }
html.nav-short [data-r="nav-desktop"] .zy-trial-short { display: inline; }
html.nav-short header > div:has(> [data-r="nav-desktop"]) { gap: 16px !important; }

/* Rows in the research page's publication list: a link with no underline on hover. */
a.zy-pub:hover { text-decoration: none; }

/* "ChatTutor is now Zymposia" bar for visitors redirected from chattutor.io (site.js). */
.zy-renamed { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; padding: 10px 52px; background: #4f46e5; color: #fff; font-size: 14px; font-weight: 400; line-height: 1.5; text-align: center; }
.zy-renamed a { color: #fff; font-weight: 500; border-bottom: 1px solid rgb(255 255 255 / 0.6); }
.zy-renamed a:hover { text-decoration: none; border-bottom-color: #fff; }
.zy-renamed-close { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #fff; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.zy-renamed-close:hover { background: rgb(255 255 255 / 0.15); }
.zy-renamed-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[dir="rtl"] .zy-renamed .zy-arr { display: inline-block; transform: scaleX(-1); }
