/*
 * AIAS theme for the embedded AIAS Leads OS (ADR-15). Upstream version 1.104.0.
 *
 * Injected by the unified-shell proxy (nginx sub_filter adds a <link> before </head>), so the
 * upstream source stays untouched. Disable: remove the sub_filter lines and restart the shell.
 * Design source: aias-learning-build (light Cool calm, dark Claude Dark, Gibson 400/600,
 * orange #F36427 as the only accent, dark ink #231F20 on orange, no orange small text, square corners).
 *
 * How it wins: upstream tokens live on :root and [data-theme="dark"] (app/globals.css) and the
 * per-install brand ramp on :root:root / :root:root[data-theme="dark"] (lib/branding/css.ts,
 * <style id="marca-instalacao">). The selectors below add one type selector (html) so they
 * outrank both without !important. Tailwind v4 utilities read these vars at use (@theme inline).
 *
 * Upstream vars overridden:
 *   --font-atkinson (next/font variable used by --font-sans and body)
 *   --color-bg, --color-surface, --color-surface-elevated
 *   --color-text, --color-text-muted, --color-text-subtle
 *   --color-border, --color-border-strong
 *   --color-brand, --color-accent-50..950, --color-accent, --color-accent-fg,
 *   --color-accent-hover, --color-accent-soft
 *   --color-neutral-50..950
 *   --color-success, --color-success-fg
 *   --radius-sm, --radius-md, --radius-lg, --radius-xl (+ Tailwind --radius-xs, -2xl, -3xl, -4xl)
 * Class selectors (kept few): .text-accent/.text-primary (ink, no orange small text), outbound chat
 * bubble, sidebar current link and row hover (aside a[aria-current="page"]), Google sign-in block and the "Create account" line.
 * Kept upstream on purpose: warning/error/info states, channel colours, agenda person
 * colours, --radius-full (avatars, switches), IBM Plex Mono.
 */

@font-face { font-family: "Gibson"; src: url("/console/assets/fonts/Gibson-Regular.woff2") format("woff2"); font-weight: 100 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Gibson"; src: url("/console/assets/fonts/Gibson-SemiBold.woff2") format("woff2"); font-weight: 600 900; font-style: normal; font-display: swap; }

/* Light: Cool calm, soft grey */
html:root:root {
  --font-atkinson: "Gibson", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;

  --color-bg: #F1F3F5;               /* --page */
  --color-surface: #FFFFFF;          /* --white */
  --color-surface-elevated: #F4F6F8; /* --linen */
  --color-text: #231F20;             /* --ink */
  --color-text-muted: #555B62;       /* --ink-2 */
  --color-text-subtle: #555B62;      /* --ink-2: the skill has no lighter text level that passes AA */
  --color-border: #DCE0E5;           /* --line */
  --color-border-strong: #A9B0B8;    /* --taupe-dk */
  --aias-row-hover: #E9ECEF;         /* --row-hover */

  --color-brand: #F36427;
  --color-accent-50: #FDF1EA;        /* --obj */
  --color-accent-100: #FDF1EA;
  --color-accent-200: #F36427;
  --color-accent-300: #F36427;
  --color-accent-400: #F36427;
  --color-accent-500: #F36427;       /* focus ring (--color-ring) */
  --color-accent-600: #F36427;
  --color-accent-700: #231F20;       /* high stops are text-strength: ink, never orange */
  --color-accent-800: #231F20;
  --color-accent-900: #231F20;
  --color-accent-950: #231F20;
  --color-accent: #F36427;
  --color-accent-fg: #231F20;        /* --on-accent */
  --color-accent-hover: #F36427;
  --color-accent-soft: #FDF1EA;      /* --obj */

  --color-neutral-50: #F8F9FA;
  --color-neutral-100: #F1F3F5;
  --color-neutral-200: #E9ECEF;
  --color-neutral-300: #DCE0E5;
  --color-neutral-400: #A9B0B8;
  --color-neutral-500: #5A6068;      /* --hero-photo */
  --color-neutral-600: #555B62;
  --color-neutral-700: #2A2D31;
  --color-neutral-800: #1F2226;
  --color-neutral-900: #231F20;
  --color-neutral-950: #231F20;      /* --ink */

  --color-success: #1F5F42;          /* --green-dk */
  --color-success-fg: #1F5F42;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
  --radius-xs: 0px;                  /* Tailwind defaults not in the upstream token set */
  --radius-2xl: 0px;
  --radius-3xl: 0px;
  --radius-4xl: 0px;
}

/* Dark: Claude Dark (skill tokens, 13 Nov 2026) */
html:root:root[data-theme="dark"] {
  --color-bg: #262624;               /* --page */
  --color-surface: #30302E;          /* --white */
  --color-surface-elevated: #383835; /* --linen */
  --color-text: #F0EFEC;             /* --ink */
  --color-text-muted: #C3C2B7;       /* --ink-2 */
  --color-text-subtle: #C3C2B7;      /* --ink-2 */
  --color-border: #383835;           /* --line */
  --color-border-strong: #898781;    /* --taupe-dk */
  --aias-row-hover: #383835;         /* --row-hover */

  --color-brand: #F36427;
  --color-accent-50: #332A25;        /* --obj */
  --color-accent-100: #332A25;
  --color-accent-200: #F36427;
  --color-accent-300: #F36427;
  --color-accent-400: #F36427;       /* dark focus ring (--ring) */
  --color-accent-500: #F36427;
  --color-accent-600: #F36427;
  --color-accent-700: #F0EFEC;       /* text-strength stops: ink */
  --color-accent-800: #F0EFEC;
  --color-accent-900: #F0EFEC;
  --color-accent-950: #F0EFEC;
  --color-accent: #F36427;
  --color-accent-fg: #231F20;        /* --on-accent */
  --color-accent-hover: #F36427;
  --color-accent-soft: #332A25;      /* --obj */

  --color-neutral-50: #F0EFEC;       /* --ink */
  --color-neutral-100: #F0EFEC;
  --color-neutral-200: #C3C2B7;      /* --ink-2 */
  --color-neutral-300: #898781;      /* --taupe-dk */
  --color-neutral-400: #898781;
  --color-neutral-500: #383835;      /* --line / --chip */
  --color-neutral-600: #383835;
  --color-neutral-700: #383835;      /* --linen */
  --color-neutral-800: #30302E;      /* --white */
  --color-neutral-900: #262624;      /* --page */
  --color-neutral-950: #1F1E1D;      /* --hero-dark */

  --color-success: #7FD3A3;          /* --green-dk */
  --color-success-fg: #7FD3A3;
}

/* Orange is never small text: accent-coloured text utilities fall back to ink (unlayered, so they beat Tailwind's @layer utilities). */
.text-accent, .text-primary,
[class*="hover:text-accent"]:hover, [class*="hover:text-primary"]:hover { color: var(--color-text); }

/* Outbound chat bubble (components/inbox/MessageBubble.tsx): orange is never a large background, so it
   becomes the objective-box pattern, faint orange tint with an orange rule. */
.rounded-br-sm.bg-primary { background-color: var(--color-accent-soft); color: var(--color-text); border-right: 3px solid var(--color-accent); }

/* Sidebar (components/shell/Sidebar.tsx, <aside>): upstream paints the current link bg-accent (solid orange)
   and hover:bg-accent/40|50 (pale orange). Orange is never a large background, so the current link
   (aria-current="page") takes the selected pattern: --obj tint, 3px orange left rule, ink 600; hover takes
   the item-row grey (--row-hover). Inset shadow instead of border so the row does not shift. */
aside a[aria-current="page"] { background-color: var(--color-accent-soft); color: var(--color-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--color-accent); }
aside :is(a, button):not([aria-current="page"]):hover { background-color: var(--aias-row-hover); color: var(--color-text); }

/* Local owner build: no Google sign-in, no self sign-up (login and signup pages). */
div.space-y-4:has(> div.flex > span.h-px):has(> button) { display: none; }
p:has(> a[href^="/signup"]) { display: none; }
