/* Color mode controls and screen-only dark palette. */
:root { color-scheme: light; }

.bc-theme-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(7, 23, 43, 0.34);
  border-radius: 0.75rem;
  color: #12355b;
  display: inline-flex;
  flex: 0 0 2.75rem;
  height: 2.75rem;
  justify-content: center;
  padding: 0.65rem;
  width: 2.75rem;
}
.bc-theme-toggle[hidden] { display: none; }
.bc-theme-toggle:hover { background: #e6f5ff; }
.bc-theme-toggle:focus-visible { outline: 3px solid #0072c6; outline-offset: 3px; }
.bc-theme-toggle svg { height: 1.25rem; width: 1.25rem; }
.bc-theme-toggle__sun { display: none; }
[data-color-mode="dark"] .bc-theme-toggle__moon { display: none; }
[data-color-mode="dark"] .bc-theme-toggle__sun { display: block; }
.mobile-nav-social { display: none; }

/* Keep the compact desktop header clear; Contact remains in the navigation. */
@media (min-width: 56.001rem) and (max-width: 64rem) {
  .header-actions .header-action { display: none; }
}
@media (max-width: 56rem) {
  .primary-navigation .mobile-nav-social {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
  }
  .primary-navigation .mobile-nav-social .mobile-nav-linkedin {
    flex: 1;
    margin-top: 0;
    min-width: 0;
    width: auto;
  }
}

@media screen and (forced-colors: none) {
  :root[data-color-mode="dark"] {
    color-scheme: dark;
    --bc-cloud: #071321;
    --bc-paper: #0b192a;
    --bc-surface: #102237;
    --bc-surface-soft: #12283e;
    --bc-copy: #d6e3ef;
    --bc-copy-soft: #afc2d5;
    --bc-charcoal: #d6e3ef;
    --bc-muted: #afc2d5;
    --bc-border: #2e465e;
    --bc-border-strong: #658099;
    --bc-line: rgba(166, 202, 231, 0.2);
    --bc-cyan-100: #132f46;
    --bc-cyan-050: #10263b;
    --bc-dark-heading: #eff7ff;
    --bc-dark-link: #83d4ff;
    --bc-shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.2);
    --bc-shadow-md: 0 24px 70px rgba(0, 0, 0, 0.28);
    --bc-form-label: #e1edf7;
    --bc-form-text: #d6e3ef;
    --bc-form-field: #0b192a;
    --bc-form-field-hover: #142c42;
    --bc-form-border: #658099;
    --bc-form-placeholder: #afc2d5;
    --bc-form-soft: #142a40;
    --bc-form-focus: #83d4ff;
    --bc-form-danger: #ff9c95;
    --bc-form-danger-text: #ffb5af;
    --bc-form-error-surface: #351c28;
    --bc-form-success-surface: #10362d;
    --bc-form-success-text: #8aebc9;
  }

  [data-color-mode="dark"] :is(h1, h2, h3, h4, h5, h6) { color: var(--bc-dark-heading); }
  [data-color-mode="dark"] a:where(:not(.bc-button, .wp-block-button__link)) { color: var(--bc-dark-link); }
  [data-color-mode="dark"] a:where(:not(.bc-button, .wp-block-button__link)):hover { color: #c1ebff; }
  [data-color-mode="dark"] :is(.bc-eyebrow, .bc-card__index, .bc-card__icon, .bc-contact-detail span, .bc-service-next__grid span) { color: var(--bc-dark-link); }
  [data-color-mode="dark"] :is(.post-card__title a, .bc-service-next__grid strong, blockquote) { color: var(--bc-dark-heading); }
  [data-color-mode="dark"] :where(a, button, input, select, textarea, summary):focus-visible { outline-color: #83d4ff; }

  [data-color-mode="dark"] .site-header {
    background: rgba(9, 23, 39, 0.97);
    border-color: var(--bc-line);
  }
  [data-color-mode="dark"] .site-header :is(.custom-logo, .site-branding__logo) { filter: brightness(0) invert(1); }
  [data-color-mode="dark"] .primary-navigation a { color: var(--bc-dark-heading); }
  [data-color-mode="dark"] .primary-navigation :is(a:hover, .current-menu-item > a, .current-menu-ancestor > a) { background: #17344d; }
  [data-color-mode="dark"] :is(.primary-navigation .sub-menu, .menu-toggle, .bc-theme-toggle) {
    background: var(--bc-surface);
    border-color: var(--bc-border-strong);
    color: var(--bc-dark-heading);
  }
  [data-color-mode="dark"] .bc-theme-toggle:hover { background: #1b3a55; }
  [data-color-mode="dark"] .primary-navigation .bc-button:not(.bc-button--secondary) { color: #fff; }
  [data-color-mode="dark"] .bc-button--secondary {
    background: transparent;
    border-color: #658099;
    color: var(--bc-dark-heading);
  }
  [data-color-mode="dark"] .bc-button--secondary:hover { background: #1b3a55; color: #fff; }
  [data-color-mode="dark"] .bc-button--light { background: #dff3ff; color: #07172b; }

  [data-color-mode="dark"] :is(.bc-section--soft, .bc-section--tint, .bc-section--contact, .bc-insight-surface) {
    background: radial-gradient(circle at 90% 5%, rgba(10, 166, 255, 0.07), transparent 28rem), var(--bc-paper);
  }
  [data-color-mode="dark"] .bc-section--pathways { background: var(--bc-cloud); }
  [data-color-mode="dark"] :is(.bc-card:not(.bc-card--dark, .bc-card--ink, .bc-card--azure), .bc-pathway, .post-card, .bc-form-shell, .bc-contact-detail, .bc-service-next, .bc-service-next__grid > div, .entry-content--prose, .bc-insight-rail-card, .entry-content.entry-content--insight, .bc-insight-topics) {
    background: var(--bc-surface);
    border-color: var(--bc-line);
  }
  [data-color-mode="dark"] .bc-pathway--enterprise { background: radial-gradient(circle at 100% 0, rgba(10, 166, 255, 0.13), transparent 18rem), var(--bc-surface); }
  [data-color-mode="dark"] .bc-pathway--small-business { background: radial-gradient(circle at 100% 0, rgba(77, 217, 180, 0.1), transparent 18rem), var(--bc-surface); }
  [data-color-mode="dark"] .bc-card__icon { background: #163750; border-color: #34566d; }
  [data-color-mode="dark"] .bc-process__step::before { color: var(--bc-dark-link); }
  [data-color-mode="dark"] .bc-pill { color: #86e7c8; border-color: #317664; }
  [data-color-mode="dark"] :is(.bc-contact-safety, .entry-content--insight > aside, .entry-content--insight > section > aside) { background: #30291c; color: #f3dab0; border-color: #967334; }
  [data-color-mode="dark"] :is(.entry-content--prose > ul, .entry-content--prose > ol, .entry-content--insight > ul, .entry-content--insight > ol, .entry-content--insight > section > ul, .entry-content--insight > section > ol, .entry-content--insight blockquote, .entry-content--insight .insights-lede) {
    background: var(--bc-surface-soft);
    border-color: var(--bc-line);
    color: var(--bc-copy);
  }
  [data-color-mode="dark"] :not(pre) > code { background: #193149; color: #bce8ff; }

  [data-color-mode="dark"] .bc-insight-main {
    --bc-insight-ink: #eff7ff;
    --bc-insight-copy: #d6e3ef;
    --bc-insight-soft: #071321;
    --bc-insight-paper: #102237;
    --bc-insight-line: rgba(166, 202, 231, 0.2);
  }
  [data-color-mode="dark"] :is(.bc-insight-rail-card .bc-insight-rail-card__label, .bc-insight-rail-card a span, .bc-table-scroll__hint) { color: var(--bc-dark-link); }
  [data-color-mode="dark"] :is(.entry-content--insight > h3, .entry-content--insight > section > h3) { color: #bce8ff; }
  [data-color-mode="dark"] :is(.bc-table-scroll, .bc-table-scroll tbody th, .bc-table-scroll tbody tr:nth-child(even) td) { background: var(--bc-surface-soft); border-color: var(--bc-line); }
  [data-color-mode="dark"] :is(.bc-table-scroll th, .bc-table-scroll td) { border-color: var(--bc-line); }
  [data-color-mode="dark"] .bc-insight-footer.entry-footer { background: var(--bc-paper); }
  [data-color-mode="dark"] .bc-insight-tags a { background: #14344c; border-color: #416580; color: #bce8ff; }
  [data-color-mode="dark"] .bc-insight-tags a:hover { background: #204a66; }

  [data-color-mode="dark"] :is(.search-field, .comment-form input:not([type="submit"]), .comment-form textarea) { background: var(--bc-surface); border-color: var(--bc-border-strong); color: var(--bc-copy); }
  [data-color-mode="dark"] .forminator-select-dropdown { background: var(--bc-surface) !important; color: var(--bc-copy) !important; }
  [data-color-mode="dark"] .forminator-select-dropdown .select2-results__option[aria-selected="true"] { background: #1b3a55 !important; color: #fff !important; }
  [data-color-mode="dark"] .forminator-select-dropdown .select2-search__field { background: var(--bc-form-field) !important; color: var(--bc-form-text) !important; }
  [data-color-mode="dark"] #primary .bc-contact-form-card .forminator-ui.forminator-custom-form .select2-selection__arrow b { border-top-color: #afc2d5 !important; }
  [data-color-mode="dark"] #primary .bc-contact-form-card .forminator-ui.forminator-custom-form .forminator-description { color: var(--bc-copy-soft) !important; }

  [data-color-mode="dark"] #primary .bc-contact-form-card .forminator-ui.forminator-custom-form .forminator-consent__label p { color: var(--bc-copy) !important; }

  /* Honor the editor's semantic palette on content that uses WordPress blocks. */
  [data-color-mode="dark"] :is(.has-paper-background-color, .has-white-background-color) { background-color: var(--bc-surface) !important; }
  [data-color-mode="dark"] .has-cloud-background-color { background-color: var(--bc-cloud) !important; }
  [data-color-mode="dark"] :is(.has-ink-color, .has-ink-soft-color) { color: var(--bc-dark-heading) !important; }
  [data-color-mode="dark"] :is(.has-copy-color, .has-muted-color) { color: var(--bc-copy) !important; }

  @media (max-width: 56rem) {
    [data-color-mode="dark"] .primary-navigation { background: #0b192a; border-color: var(--bc-line); }
  }
}

@media print { .bc-theme-toggle { display: none !important; } }
@media (forced-colors: active) { .bc-theme-toggle { border-color: ButtonText; color: ButtonText; } }
