/* The thinkbridge theme: the one place the app's colours, font and focus ring
   are defined. Every other token set aliases these (Tailwind's @theme in
   styles/legacy.css, the --sg-* pricing tokens, the workspace --color-*
   tokens, feedback-theme.css), so a change here reaches every page.

   Values come from the approved "Plans and pricing for partners" page and its
   brand guide (2 Nov 2026). Linked first by app.html and 404.html, and never
   switched off: the pricing pages turn off styles.css and role-ui.css only. */

:root {
  --ta-accent: #330066;
  --ta-accent-hover: #1F003D;
  --ta-accent-ink: #0F001F;
  --ta-accent-medium: #8566A3;
  --ta-accent-line: #C6B8D4;
  --ta-accent-tint: #F1EDF4;
  --ta-accent-wash: #F6F0F7;

  /* One grey scale for the whole app. 100, 200, 500 and 950 are the brand's
     page grey, line, text grey and ink; the steps between are ours. Every
     slate, zinc and gray the pages used to type out maps onto a step here. */
  --ta-gray-50: #FAFAFB;
  --ta-gray-100: #F4F4F6;
  --ta-gray-200: #E6E8EF;
  --ta-gray-300: #D3D5DD;
  --ta-gray-400: #A0A2AD;
  --ta-gray-500: #66666D;
  --ta-gray-600: #4E4E56;
  --ta-gray-700: #3A3A42;
  --ta-gray-800: #26262B;
  --ta-gray-900: #18181B;
  --ta-gray-950: #0C0C0E;

  --ta-ink: var(--ta-gray-950);
  --ta-muted: var(--ta-gray-500);
  --ta-muted-2: var(--ta-muted);
  --ta-page: var(--ta-gray-100);
  --ta-surface: #FFFFFF;
  --ta-aside: #FCFAFD;
  --ta-line: var(--ta-gray-200);
  --ta-line-soft: #EEF0F4;

  --ta-good: #1F7A45;
  --ta-good-bg: #E7F4EC;
  --ta-warn: #946200;
  --ta-warn-bg: #FDF1DD;
  --ta-danger: #B42318;
  --ta-idle-bg: var(--ta-gray-100);

  --ta-gradient-number: linear-gradient(135deg, #0F001F 15%, #330066);
  --ta-gradient-dark: linear-gradient(160deg, #1F003D, #0F001F);
  --ta-wash: radial-gradient(80% 60% at 100% 0%, var(--ta-accent-wash), transparent 70%), #fff;
  --ta-shadow-soft: 0 24px 60px -28px rgba(12, 12, 14, .22);
  --ta-shadow-tile: 0 14px 34px -26px rgba(12, 12, 14, .2);

  --ta-font: 'Mulish', system-ui, -apple-system, sans-serif;

  /* Shapes inside the app (the pricing page has its own, rounder ones). */
  --ta-radius-control: 8px;
  --ta-radius-card: 12px;

  /* A partner's white logo file, tinted to its navy on our light headers. */
  --ta-partner-logo-filter: brightness(0) saturate(100%) invert(9%) sepia(33%) saturate(2400%) hue-rotate(178deg) brightness(92%) contrast(101%);
}

/* A partner site's colours (src/platform/site.ts sets data-site from the
   host). Only the accent family and the two brand gradients change; greys,
   status colours and the font stay ours. Breach Secure Now: navy #001828,
   blue #0F5F94, from breachsecurenow.com. */
:root[data-site="bsn"] {
  --ta-accent: #0F5F94;
  --ta-accent-hover: #0B4A73;
  --ta-accent-ink: #001828;
  --ta-accent-medium: #5B8FB5;
  --ta-accent-line: #B9D5E8;
  --ta-accent-tint: #E7F2F9;
  --ta-accent-wash: #EEF7FC;
  --ta-aside: #F7FBFE;
  --ta-gradient-number: linear-gradient(135deg, #001828 15%, #0F5F94);
  --ta-gradient-dark: linear-gradient(160deg, #0B3550, #001828);

  /* The signed-out landing page (Marketing.css --mk-*). BSN's palette: teal
     #1C7168, aqua #00D6BD, pale cyan #D1FAFF, light aqua #95E9E1, deep navy
     text #082F49. */
  --mk-header-bg: #001828;
  --mk-header-bg-solid: #001828;
  --mk-header-line: transparent;
  --mk-header-shadow: none;
  --mk-header-ink: #FFFFFF;
  --mk-header-muted: rgba(255, 255, 255, .8);
  --mk-header-rule: rgba(255, 255, 255, .35);
  --mk-partner-logo-filter: none;
  --mk-hero-bg: linear-gradient(90deg, #1C7168, #0F5F94);
  --mk-hero-blobs: none;
  --mk-hero-ink: #FFFFFF;
  --mk-hero-muted: rgba(255, 255, 255, .85);
  --mk-hero-line: rgba(255, 255, 255, .25);
  --mk-hero-ghost-bg: transparent;
  --mk-hero-ghost-ink: #FFFFFF;
  --mk-hero-ghost-line: rgba(255, 255, 255, .6);
  --mk-tb-logo-dark: none;
  --mk-tb-logo-white: block;
  --mk-heading-ink: #082F49;
  --mk-page-bg: #F7F9FF;
  --mk-how-bg: #FFFFFF;
  --mk-footer-bg: #F7F9FF;
  --mk-highlight: #00D6BD;
  --mk-highlight-hover: color-mix(in srgb, #00D6BD 85%, #001828);
  --mk-highlight-ink: #001828;
  --mk-band-bg: #001828;
  --mk-row-bg: rgba(255, 255, 255, .07);
  --mk-cta-bg: linear-gradient(90deg, #1C7168, #0F5F94);
  --mk-tint: #D1FAFF;
  --mk-tint-line: #95E9E1;
  --mk-blueprint-bg: #D1FAFF;
  --mk-blueprint-eyebrow: #1C7168;
  --mk-blueprint-value-bg: transparent;
  --mk-blueprint-value-line: transparent;
  --mk-tile-bg: #D1FAFF;
  --mk-rail-bg: #001828;
  --mk-rail-line: #001828;
  --mk-rail-ink: rgba(255, 255, 255, .55);
  --mk-rail-active-bg: #00D6BD;
  --mk-rail-active-ink: #001828;
  --mk-step-icon-bg: #0F5F94;
  --mk-step-n-bg: #00D6BD;
  --mk-step-n-ink: #001828;
  --mk-tag-bg: #00D6BD;
  --mk-tag-line: #00D6BD;
  --mk-tag-ink: #001828;
}

/* "in partnership with <partner logo>" beside our logo on a partner site
   (src/shell/PartnerMark.tsx). Here because it is the one stylesheet every
   page keeps, the pricing pages included. The partner's logo file is white,
   for their dark headers; on ours it is tinted to their navy. */
.ta-partner-mark { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 1; }
.ta-partner-mark__rule { width: 1px; height: 24px; background: var(--ta-line); flex-shrink: 0; }
.ta-partner-mark__text { font-size: 12px; line-height: 1.2; color: var(--ta-muted); white-space: nowrap; }
.ta-partner-mark__logo { display: block; height: 22px; width: auto; max-width: 140px; filter: var(--ta-partner-logo-filter); }
.ta-partner-mark--on-dark .ta-partner-mark__rule { background: rgba(255, 255, 255, .35); }
.ta-partner-mark--on-dark .ta-partner-mark__text { color: rgba(255, 255, 255, .8); }
.ta-partner-mark--on-dark .ta-partner-mark__logo { filter: none; }
/* A registry site's logo (Settings -> Sites) is shown in its own colours. */
.ta-partner-mark--as-is .ta-partner-mark__logo { filter: none; }
.ta-partner-mark--own-row .ta-partner-mark__rule { display: none; }
/* "thinkAdvisor powered by thinkbridge" at the foot of the sign-in and sign-up
   cards on a partner site (src/shell/PoweredBy.tsx). */
.ta-powered-by { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding-top: 14px;
  border-top: 1px solid var(--ta-line); font-family: var(--ta-font); font-size: 12px; line-height: 1.2; color: var(--ta-muted); }
.ta-powered-by__name { color: var(--ta-ink); font-weight: 300; }
.ta-powered-by__name b { font-weight: 900; }
.ta-powered-by img { display: block; height: 15px; width: auto; }
@media (max-width: 640px) { .ta-partner-mark:not(.ta-partner-mark--own-row) .ta-partner-mark__text { display: none; } }
/* A phone's header has no room beside its own controls; the sign-in card
   keeps the mark on a row of its own (--own-row). */
@media (max-width: 480px) { .ta-partner-mark:not(.ta-partner-mark--own-row) { display: none; } }
/* Pages whose header has no room (src/pages/pricing/shell.tsx PartnerRow)
   show it on phones on a row of its own under the header instead. */
.ta-partner-row { display: none; }
@media (max-width: 480px) { .ta-partner-row { display: flex; justify-content: center; padding: 6px 16px 8px; } }

body {
  font-family: var(--ta-font);
  color: var(--ta-ink);
}

/* In the base layer so a shared control (.ta-input's own focus ring) can
   refine it; unlayered, it would win over every layered rule. */
@layer base {
  :focus-visible { outline: 2px solid var(--ta-accent); outline-offset: 3px; }
  /* On a text field the offset reads as a second border: sit on it instead. */
  :is(input, select, textarea):focus-visible { outline-offset: -1px; }
}

/* The vendored tour (boarding.js) sets `font: … sans-serif` on its popover and
   loads after this file, so the override needs the higher specificity. */
html body div#boarding-popover-item :is(*, [class]) { font-family: var(--ta-font); }
