/* ClimateDoor look for the Twenty CRM (v2.50.0).
   Served by the theme proxy (infra/theme/nginx.conf), which adds one <link> to Twenty's page.
   It only overrides Twenty's own theme variables (--t-*), which Twenty sets on <html class="light|dark">.
   Our selectors use html.light / html.dark, so they win over Twenty's .light / .dark without !important.
   If a future Twenty renames these variables, this file simply stops applying and Twenty looks stock.
   Fonts: Montserrat variable (Google Fonts, SIL Open Font License 1.1), Latin subset. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/cd-theme/fonts/montserrat-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/cd-theme/fonts/montserrat-latin-italic-var.woff2") format("woff2");
}

/* Both themes: brand font. Inter stays as the fallback for characters outside the Latin subset. */
html.light,
html.dark {
  --t-font-family: "Montserrat", Inter, "Helvetica Neue", Arial, sans-serif;
}
/* Twenty sets body { font-family: Inter } directly; text that inherits from body follows this. */
html.light body,
html.dark body {
  font-family: "Montserrat", Inter, "Helvetica Neue", Arial, sans-serif;
}

/* Light: Twenty's white workspace with ClimateDoor ink, warm neutrals and a teal accent. */
html.light {
  --theme-light-background-secondary: #faf8f5;

  --t-background-secondary: #faf8f5;
  --t-background-tertiary: #f3efe8;
  --t-background-quaternary: #ebe5db;
  --t-border-color-strong: #ddd4c6;
  --t-border-color-medium: #ece6dc;
  --t-border-color-light: #f3efe8;
  --t-border-color-blue: #a3b9b5;
  /* Dark buttons and tooltips: Twenty's near-black becomes ClimateDoor teal. */
  --t-background-inverted-primary: #294144;
  --t-background-inverted-secondary: #3d5a5e;
  --t-background-primary-inverted: #294144;
  --t-background-primary-inverted-hover: #1a2e31;
  --t-border-color-inverted: #294144;

  --t-font-color-primary: #1d2e30;
  --t-font-color-secondary: #4a5c5e;
  --t-font-color-tertiary: #6f7f80;

  --t-accent-primary: #cddbd8;
  --t-accent-secondary: #cddbd8;
  --t-accent-tertiary: #e8efed;
  --t-accent-quaternary: #f4f7f6;
  --t-accent-accent3570: #7f9c97;
  --t-accent-accent4060: #7f9c97;
  --t-accent-accent1: #fbfcfc;
  --t-accent-accent2: #f4f7f6;
  --t-accent-accent3: #e8efed;
  --t-accent-accent4: #dbe6e4;
  --t-accent-accent5: #cddbd8;
  --t-accent-accent6: #bccdca;
  --t-accent-accent7: #a3b9b5;
  --t-accent-accent8: #7f9c97;
  --t-accent-accent9: #294144;
  --t-accent-accent10: #1a2e31;
  --t-accent-accent11: #294144;
  --t-accent-accent12: #1a2e31;
  --t-font-color-on-accent: #ffffff;

  /* Twenty's blue becomes ClimateDoor teal: its primary buttons, filter chips, focus rings and links read --t-color-blue*. */
  --t-color-blue: #294144;
  --t-color-blue1: #fbfcfc;
  --t-color-blue2: #f4f7f6;
  --t-color-blue3: #e8efed;
  --t-color-blue4: #dbe6e4;
  --t-color-blue5: #cddbd8;
  --t-color-blue6: #bccdca;
  --t-color-blue7: #a3b9b5;
  --t-color-blue8: #7f9c97;
  --t-color-blue9: #294144;
  --t-color-blue10: #1a2e31;
  --t-color-blue11: #294144;
  --t-color-blue12: #1a2e31;
  --t-color-transparent-blue1: color-mix(in srgb, #294144 2%, transparent);
  --t-color-transparent-blue2: color-mix(in srgb, #294144 4%, transparent);
  --t-color-transparent-blue3: color-mix(in srgb, #294144 8%, transparent);
  --t-color-transparent-blue4: color-mix(in srgb, #294144 12%, transparent);
  --t-color-transparent-blue5: color-mix(in srgb, #294144 16%, transparent);
  --t-color-transparent-blue6: color-mix(in srgb, #294144 20%, transparent);
  --t-color-transparent-blue7: color-mix(in srgb, #294144 26%, transparent);
  --t-color-transparent-blue8: color-mix(in srgb, #294144 36%, transparent);
  --t-color-transparent-blue9: color-mix(in srgb, #294144 85%, transparent);
  --t-color-transparent-blue10: color-mix(in srgb, #294144 90%, transparent);
  --t-color-transparent-blue11: color-mix(in srgb, #294144 80%, transparent);
  --t-color-transparent-blue12: color-mix(in srgb, #294144 92%, transparent);
  --t-background-transparent-blue: color-mix(in srgb, #294144 14%, transparent);
  --t-illustration-icon-color-blue: #294144;
  --t-illustration-icon-fill-blue: #e8efed;
}

/* Dark: teal-deep surfaces, warm paper text, peach accent. Text pairs meet WCAG AA. */
html.dark {
  --theme-dark-background-secondary: #1a2e31;

  --t-background-primary: #142427;
  --t-background-secondary: #1a2e31;
  --t-background-tertiary: #1f3538;
  --t-background-quaternary: #253d40;
  --t-background-inverted-primary: #f6f1e8;
  --t-background-inverted-secondary: #cbb5a1;
  --t-background-primary-inverted: #f6f1e8;
  --t-background-primary-inverted-hover: #cbb5a1;
  --t-background-transparent-blue: #f8c18d33;

  --t-border-color-strong: #3d5a5e;
  --t-border-color-medium: #253d40;
  --t-border-color-light: #1f3538;
  --t-border-color-inverted: #f6f1e8;
  --t-border-color-secondary-inverted: #cbb5a1;
  --t-border-color-blue: #7a5a36;

  --t-font-color-primary: #f6f1e8;
  --t-font-color-secondary: #cbb5a1;
  --t-font-color-tertiary: #9fb0ae;
  --t-font-color-light: #6f8786;
  --t-font-color-extra-light: #4f6668;
  --t-font-color-inverted: #142427;

  --t-accent-primary: #4b3d2e;
  --t-accent-secondary: #4b3d2e;
  --t-accent-tertiary: #33332c;
  --t-accent-quaternary: #23302f;
  --t-accent-accent3570: #a8773d;
  --t-accent-accent4060: #a8773d;
  --t-accent-accent1: #1c2a2b;
  --t-accent-accent2: #23302f;
  --t-accent-accent3: #33332c;
  --t-accent-accent4: #3e382e;
  --t-accent-accent5: #4b3d2e;
  --t-accent-accent6: #5c4630;
  --t-accent-accent7: #7a5a36;
  --t-accent-accent8: #a8773d;
  --t-accent-accent9: #f8c18d;
  --t-accent-accent10: #fbd1a8;
  --t-accent-accent11: #f8c18d;
  --t-accent-accent12: #fde4cc;
  --t-font-color-on-accent: #1a2e31;

  /* Twenty's blue becomes ClimateDoor peach (a deeper tone, #8f6330, where white text sits on it: 5.3:1): its primary buttons, filter chips, focus rings and links read --t-color-blue*. */
  --t-color-blue: #8f6330;
  --t-color-blue1: #1c2a2b;
  --t-color-blue2: #23302f;
  --t-color-blue3: #33332c;
  --t-color-blue4: #3e382e;
  --t-color-blue5: #4b3d2e;
  --t-color-blue6: #5c4630;
  --t-color-blue7: #7a5a36;
  --t-color-blue8: #a8773d;
  --t-color-blue9: #8f6330;
  --t-color-blue10: #c58f55;
  --t-color-blue11: #f8c18d;
  --t-color-blue12: #fde4cc;
  --t-color-transparent-blue1: color-mix(in srgb, #f8c18d 2%, transparent);
  --t-color-transparent-blue2: color-mix(in srgb, #f8c18d 4%, transparent);
  --t-color-transparent-blue3: color-mix(in srgb, #f8c18d 8%, transparent);
  --t-color-transparent-blue4: color-mix(in srgb, #f8c18d 12%, transparent);
  --t-color-transparent-blue5: color-mix(in srgb, #f8c18d 16%, transparent);
  --t-color-transparent-blue6: color-mix(in srgb, #f8c18d 20%, transparent);
  --t-color-transparent-blue7: color-mix(in srgb, #f8c18d 26%, transparent);
  --t-color-transparent-blue8: color-mix(in srgb, #f8c18d 36%, transparent);
  --t-color-transparent-blue9: color-mix(in srgb, #f8c18d 85%, transparent);
  --t-color-transparent-blue10: color-mix(in srgb, #f8c18d 90%, transparent);
  --t-color-transparent-blue11: color-mix(in srgb, #f8c18d 80%, transparent);
  --t-color-transparent-blue12: color-mix(in srgb, #f8c18d 92%, transparent);
  --t-background-transparent-blue: color-mix(in srgb, #f8c18d 14%, transparent);
  --t-illustration-icon-color-blue: #8f6330;
  --t-illustration-icon-fill-blue: #3e382e;
}

/* Sign-in logo. Twenty shows its own tile with the workspace logo squeezed into a 24 px corner
   badge, which made the ClimateDoor wordmark (1080x187) unreadable (Nick's Chrome E2E, 2026-11-15).
   Matched by structure, not Twenty's hashed class names: the box whose children are Twenty's tile
   link and the absolutely placed badge holding the workspace picture. The tile is hidden and the
   wordmark is shown at a readable width on a teal plate in its place. */
div:has(> a + div > img[src*="/file/core-picture/"]) {
  width: auto !important;
  height: auto !important;
  display: flex;
  justify-content: center;
}
div:has(> a + div > img[src*="/file/core-picture/"]) > a {
  display: none !important;
}
div:has(> a + div > img[src*="/file/core-picture/"]) > div:has(> img[src*="/file/core-picture/"]) {
  position: static !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
div:has(> a + div > img[src*="/file/core-picture/"]) img[src*="/file/core-picture/"] {
  width: 220px !important;
  height: auto !important;
  max-width: 70vw;
  object-fit: contain;
  /* The wordmark is white: a teal plate keeps it readable on the light and the dark sign-in page. */
  background: #294144 !important;
  padding: 12px 18px;
  border-radius: 10px !important;
  box-sizing: content-box;
}
