/*
 * Braintoy site adjustments. Everything we layer on top of the exported theme
 * lives here so it is easy to find and easy to undo.
 */

/* ==========================================================================
 * 1. mlOS PLATFORM SWITCH  -  everything that points at the retired section
 *
 * >>> TO REINSTATE THE WHOLE SECTION: delete this block, from the BEGIN line
 * >>> to the END line. That is the only edit needed. The markup is untouched.
 *
 * Also undo, if the section comes back:
 *   - robots meta on /the-brain/, /tour-the-platform/, /resources-faq/,
 *     /enhancing-your-mlops-experience-with-mlos/ and /generative-ai/ back to
 *     "index, follow"
 *   - their <url> entries back into page-sitemap.xml and sitemap.xml
 *
 * /generative-ai/ is in that list because its heading reads "Generative AI on
 * mlOS". It is otherwise an ordinary page and nothing in the menu leads to it.
 *
 * Listed in the Code Fixes Applied document.
 * ========================================================================== */

/* == BEGIN mlOS PLATFORM HIDE ------------------------------------------- */

/* Tour the Platform, footer nav column */
.elementor-element-e20b788 {
  display: none !important;
}

/*
 * Calls to action elsewhere that lead into the section. Matched on where the
 * link points rather than on a widget id, so an unfound promo is caught too.
 * Both the Elementor widget and the bare button wrapper are covered.
 */
.elementor-widget-button:has(a[href^="/the-brain"]),
.elementor-widget-button:has(a[href^="/tour-the-platform"]),
.elementor-widget-button:has(a[href^="/resources-faq"]),
.elementor-widget-button:has(a[href^="/enhancing-your-mlops-experience-with-mlos"]),
.elementor-widget-button:has(a[href^="/generative-ai"]) {
  display: none !important;
}

/* == END mlOS PLATFORM HIDE --------------------------------------------- */
/* --------------------------------------------------------------------------
 * 2. Buttons
 * -------------------------------------------------------------------------- */

/*
 * Happy Addons buttons (Read More and friends). The plugin sheet loads after
 * ours, so these selectors are deliberately more specific to win on
 * specificity rather than source order.
 */
a.ha-btn,
.elementor-widget-container a.ha-btn,
.ha-btn {
  border-radius: 8px !important;
  padding: 12px 26px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 180ms ease,
              background-color 180ms ease,
              filter 180ms ease;
  will-change: transform;
}

a.ha-btn:hover,
a.ha-btn:focus-visible,
.ha-btn:hover,
.ha-btn:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.05);
  box-shadow: 0 10px 20px -8px rgba(230, 75, 56, 0.45);
}

a.ha-btn:active,
.ha-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
}

/*
 * Happy Addons never sizes its button icon and the chevron ships with a
 * viewBox but no width or height, so it scales to fill the button. Elementor
 * constrains its own icons with height: 1em; this matches that.
 */
.ha-btn .ha-btn-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

/* trailing arrow slides on hover */
.ha-btn--icon-after svg,
.ha-btn--icon-after i {
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.ha-btn--icon-after:hover svg,
.ha-btn--icon-after:hover i {
  transform: translateX(4px);
}

/*
 * Load More. The button is the redesign's own .rd-btn--line, styled in
 * braintoy-redesign.css; this only centres it under the grid.
 *
 * .bt-loadmore, not the plugin's .ha-pg-loadmore: the plugin binds its own
 * handler to that class, which posts to the retired admin-ajax endpoint.
 */
.bt-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* keyboard focus ring */
.ha-btn:focus-visible {
  outline: 2px solid #066aab;
  outline-offset: 3px;
}

/* posts revealed by Load More fade in rather than snapping */
.ha-pg-item[hidden] {
  display: none;
}

/* backwards, not both. With both, the animation's last keyframe keeps applying
   after it has finished, and an animated value outranks a normal declaration,
   so transform stays pinned at none and .ha-pg-item:hover can never move a
   card that arrived by Load More. backwards holds the opening frame through
   the stagger delay and then hands the element back to the stylesheet. */
.ha-pg-item.bt-revealed {
  animation: bt-card-in 320ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}

@keyframes bt-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
 * 4. LinkedIn footer cards
 *
 * Equal height across the row, Read More pinned to the bottom. The widget wrap
 * is a wrapping flex container with align-content: flex-start, which is why
 * the card does not fill its column on its own.
 *
 * The figure needs flex: 0 0 auto or it absorbs the spare height and pushes
 * the body out through the bottom.
 * -------------------------------------------------------------------------- */

.elementor-widget-wrap:has(> .elementor-widget-ha-card) {
  align-content: stretch;
}

.elementor-widget-ha-card.ha-card {
  display: flex;
  flex-direction: column;
}

.elementor-widget-ha-card.ha-card > .elementor-widget-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.elementor-widget-ha-card.ha-card .ha-card-figure {
  flex: 0 0 auto;
}

.elementor-widget-ha-card.ha-card .ha-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.elementor-widget-ha-card.ha-card .ha-card-body > .ha-btn {
  margin-top: auto;
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
 * 5. Hover feedback
 *
 * Fills the gaps where the theme gives a clickable thing no hover state,
 * reusing the brand red the header nav already uses.
 * -------------------------------------------------------------------------- */

/*
 * Footer links. The nine column links and the email address are bare <a> with
 * no class, so no theme rule reaches them. Excludes the buttons and social
 * icons in the same footer, which already respond.
 */
.elementor-location-footer a:not(.ha-btn):not(.elementor-button):not(.elementor-social-icon) {
  transition: color 160ms ease;
}

/*
 * The underline matters as much as the colour: the email address is already
 * the accent red, so recolouring it alone would leave it the one footer link
 * with no feedback.
 */
.elementor-location-footer a:not(.ha-btn):not(.elementor-button):not(.elementor-social-icon):hover,
.elementor-location-footer a:not(.ha-btn):not(.elementor-button):not(.elementor-social-icon):focus-visible {
  color: #e64b38;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/*
 * Elementor buttons, including the announcement bar. They carry
 * elementor-animation-grow but that stylesheet is not loaded here, so
 * without this they are inert on hover.
 */
.elementor-button {
  transition: transform 160ms cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 160ms ease,
              filter 160ms ease;
}

.elementor-button:hover,
.elementor-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 8px 18px -8px rgba(16, 24, 40, 0.45);
}

/* Carousel dots */
.slick-dots li button,
.swiper-pagination-bullet {
  transition: transform 160ms ease, opacity 160ms ease;
}

.slick-dots li button:hover,
.slick-dots li button:focus-visible,
.swiper-pagination-bullet:hover {
  transform: scale(1.4);
  opacity: 1;
}

/* Carousel arrows */
.elementor-swiper-button {
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.elementor-swiper-button:hover,
.elementor-swiper-button:focus-visible {
  color: #e64b38;
  opacity: 1;
  transform: scale(1.12);
}

/* FAQ accordion headers are clickable but read as plain text */
.ha-accordion__item-title {
  cursor: pointer;
  transition: color 160ms ease;
}

.ha-accordion__item-title:hover,
.ha-accordion__item-title:focus-visible {
  color: #e64b38;
}

/* A linked image gets no benefit from a text colour change, so dim it instead */
.elementor-location-header a:has(> img) img {
  transition: opacity 180ms ease;
}

.elementor-location-header a:has(> img):hover img {
  opacity: 0.82;
}

/* --------------------------------------------------------------------------
 * 6. Announcement bar dismiss
 *
 * The class goes on <html> from a script in the head, so a dismissed bar is
 * hidden before it can paint.
 * -------------------------------------------------------------------------- */

/* BOTH BARS. The pages rebuilt around the new header carry .rd-newsbar
   instead of the exported Elementor section, and the dismissal is applied by
   this rule rather than by the script: without the second selector a visitor
   could close the bar and meet it again on the very next page. */
html.bt-announcement-dismissed [data-news-bar],
html.bt-announcement-dismissed .elementor-element-94a0ddc {
  display: none !important;
}

.elementor-element-94a0ddc .elementor-container {
  position: relative;
  /* Keep the bar's own content clear of the close control, which sits on top of
     it. Without this the News button runs underneath it on a phone, where there
     is no room to spare. */
  padding-right: 52px;
}

.bt-announcement-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  opacity: 0.75;
  cursor: pointer;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.bt-announcement-close svg {
  width: 14px;
  height: 14px;
}

.bt-announcement-close:hover,
.bt-announcement-close:focus-visible {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.18);
}

.bt-announcement-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* the bar is tight on a phone, so keep the close control clear of the text */
@media (max-width: 781px) {
  .bt-announcement-close {
    top: 6px;
    right: 4px;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
 * 7. A picture opened large
 *
 * braintoy-gallery.js opens the picture in any .bt-gal-zoom button large:
 * the product list's galleries (braintoy/components/cards/product_list.css)
 * and the photographs on the Courses page.
 * -------------------------------------------------------------------------- */

.bt-gal-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.bt-gal-zoom:hover img {
  transform: scale(1.015);
}

/* enlarged view */
.bt-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(26, 16, 40, 0.88);
}

.bt-zoom.is-open { display: flex; }

.bt-zoom-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
}

.bt-zoom-figure img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  background: #ffffff;
}

.bt-zoom-figure figcaption {
  padding-top: 14px;
  text-align: center;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.bt-zoom-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.bt-zoom-close:hover { background: rgba(255, 255, 255, 0.28); }

/* --------------------------------------------------------------------------
 * The lorry in the homepage products band
 * -------------------------------------------------------------------------- */

/*
 * The wheels and the road under them. These are declared here instead of being
 * beats in the band's timeline because anime does not loop a child of a
 * timeline: a drive given seven turns runs them and then stops, with the
 * slide still on screen.
 *
 * The wheels already carry transform-box and transform-origin inline, so they
 * turn about their own centres. 500 is ten of the road's 28 and 22 dashes, so
 * its loop joins invisibly.
 */
@keyframes bt-roll { to { transform: rotate(360deg); } }
@keyframes bt-flow { to { stroke-dashoffset: 500; } }

.bt-roll { animation: bt-roll 1714ms linear infinite; }
.bt-flow { animation: bt-flow 3158ms linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .bt-roll,
  .bt-flow {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
 * 8. Reduced motion
 * -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .ha-btn,
  .bt-loadmore,
  .elementor-button,
  .slick-dots li button,
  .swiper-pagination-bullet,
  .elementor-swiper-button,
  .ha-btn--icon-after svg,
  .ha-btn--icon-after i {
    transition: none;
  }
  .ha-btn:hover,
  .bt-loadmore:hover,
  .elementor-button:hover,
  .slick-dots li button:hover,
  .swiper-pagination-bullet:hover,
  .elementor-swiper-button:hover,
  .ha-btn:active,
  .bt-loadmore:active {
    transform: none;
  }
  .ha-pg-item.bt-revealed {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
 * 9. Footer
 * -------------------------------------------------------------------------- */

/*
 * Copyright line. The theme sets 12px from an Elementor inline block that
 * loads after this sheet, so the selector matches it exactly and !important
 * carries it. Same element id on all 45 pages that have the footer.
 */
.elementor-1402 .elementor-element.elementor-element-54e29a6 .elementor-heading-title {
  font-size: 14px !important;
}

/* --------------------------------------------------------------------------
 * 10. Form fields on touch screens
 * -------------------------------------------------------------------------- */

/*
 * Safari on iOS zooms the page in when a field under 16px is focused. The
 * product pages set 0.9rem (14.4px) and the contact form 14px.
 *
 * Fields go to 16px at tablet width and below. Desktop keeps the smaller size.
 * Set here because every page carrying a form loads this file after its own.
 */
@media (max-width: 1024px) {
  /* The product pages, which use .form-group. */
  .form-group input,
  .form-group select,
  .form-group textarea,
  /* The contact form, which is built by Elementor and has no .form-group at
     all. */
  .elementor-field-group input,
  .elementor-field-group select,
  .elementor-field-group textarea,
  .elementor-field,
  input.elementor-field,
  select.elementor-field,
  textarea.elementor-field {
    font-size: 16px;
  }

  /*
   * The theme sets all seven contact fields to 14px in salient-dynamic-styles
   * .css, and the rule above beats it on none of them: .container-wrap
   * input[type="email"] outweighs it, and .container-wrap select ties with it
   * and falls to load order.
   *
   * important rather than a heavier selector, which would leave those resting
   * on the order of two link tags. Any value below 16 brings the zoom back.
   */
  .elementor-field-group input,
  .elementor-field-group select,
  .elementor-field-group textarea {
    font-size: 16px !important;
  }
}

/* --------------------------------------------------------------------------
 * 12. Product page header on small screens
 * -------------------------------------------------------------------------- */

/*
 * The header is one row: wordmark, Book a Demo, menu button. At 345 and below
 * the row is wider than the screen and flex takes the difference out of
 * whatever gives, wrapping the button and running 12px off the right by 280.
 *
 * The wordmark and demo button give width back deliberately rather than being
 * squeezed at random. The demo button keeps its place rather than being
 * hidden.
 *
 * On FluxAgent, the tightest of the three, there are 68px between wordmark
 * and button at 360, 35px at 320, 6px at 280, all inside the screen.
 */
@media (max-width: 560px) {
  .nav-container {
    gap: 10px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
  }

  .nav-actions .demo-btn {
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 0.5rem 0.7rem;
    box-shadow: none;
  }

  .mobile-toggle {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 400px) {
  .logo-text {
    font-size: 0.92rem;
  }

  .nav-actions .demo-btn {
    font-size: 0.72rem;
    padding: 0.45rem 0.6rem;
  }

  /*
   * At 280, the narrowest screen in use, the row's 24px of side padding is the
   * difference between the menu button sitting inside the screen and hanging
   * off it. Only the header row gives it up.
   */
  .nav-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/*
 * At 320 and below the row is still a few pixels wider than the screen, and
 * what hangs off the end is the menu button. The last of the width comes out
 * of the demo button and the space between the three of them.
 */
@media (max-width: 320px) {
  .nav-container {
    gap: 6px;
  }

  .nav-actions .demo-btn {
    font-size: 0.68rem;
    padding: 0.4rem 0.5rem;
  }
}

/* --------------------------------------------------------------------------
 * 13. The theme menu on touch screens
 * -------------------------------------------------------------------------- */

/*
 * At 390 wide with the menu open, the button is 45 square. The entries are
 * full width by 40 tall: over the 24 of AA, four short of the 44 of AAA, and
 * left at 40 because 44 changes a theme component that sets the height of the
 * whole menu.
 *
 * The theme's submenu arrow is 23 by 33, a pixel under the AA width, so it is
 * widened. Only the area around it: the arrow is drawn by the theme and is
 * not resized, so the menu looks the same.
 */
@media (max-width: 1024px) {
  .elementor-nav-menu--dropdown .sub-arrow {
    min-width: 32px;
    min-height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
 * 14. The blog bar when it stacks
 * -------------------------------------------------------------------------- */

/*
 * A heading and a button side by side, the button carrying a left margin.
 * Below about 700 they stack, and that margin then pushes the button off
 * centre with no space above it, the heading having no margin of its own.
 * Stacked, they are centred as a column with a gap.
 */
@media (max-width: 700px) {
  .elementor-element-94a0ddc .elementor-widget-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /* important throughout this block: the page builder writes the heading
       size, the button and this padding through selectors carrying the
       element's own generated id, which a class cannot outrank. */
    padding: 8px 10px !important;
  }

  /* THE GUTTER FOR THE CLOSE CONTROL IS ONLY ON THE RIGHT, so the words and
     the button centre themselves in what is left of the bar rather than in the
     bar, and sit 26 pixels left of the middle. Stacked on a phone neither of
     them comes anywhere near the control, which sits in the top corner, so the
     gutter is not needed and the content can have the whole width. */
  .elementor-element-94a0ddc .elementor-container {
    padding-right: 0;
  }

  /* Twenty four pixels is a page heading, not a line on a bar above the menu.
     At that size the pair takes 111 pixels of a 844 tall screen before the
     menu has even started. */
  /* Written long because this stylesheet already carries
     h2.elementor-heading-title:not(...) at 24px and important, which outranks
     a class and an attribute. Three classes and an element beats it. */
  .elementor-element-94a0ddc h2.elementor-heading-title[data-news-title] {
    font-size: 17px !important;
    line-height: 1.25 !important;
  }

  .elementor-element-94a0ddc .elementor-button {
    padding: 7px 16px !important;
    font-size: 12.5px !important;
    line-height: 1.3 !important;
    min-height: 0;
  }
}
/* --------------------------------------------------------------------------
 * 15. The menu on phones and tablets
 * -------------------------------------------------------------------------- */

/*
 * Opening the builder's burger fills the screen.
 *
 * Six entries, four with children, and Solutions has eleven. Eleven stacked
 * rows is more than a phone screen holds, so children go in columns.
 *
 * Everything below keys off classes the page already carries: elementor-active
 * on the toggle, highlighted on a parent whose children show. No markup is
 * changed.
 */
@media (max-width: 1024px) {
  /* The toggle is the close control. It stays exactly where the burger was, so
     opening and closing costs no finger travel and the control never moves. */
  .elementor-menu-toggle.elementor-active {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
  }

  .elementor-menu-toggle.elementor-active i,
  .elementor-menu-toggle.elementor-active svg {
    color: #ffffff;
    fill: #ffffff;
  }

  /*
   * The panel. Sized from the viewport rather than as a percentage: the header
   * band in section 16 carries a backdrop filter, which makes the header the
   * box a fixed child measures against.
   *
   * The builder writes top, left and width inline, which only important beats.
   */
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown,
  .elementor-menu-toggle:not(.elementor-active) + .elementor-nav-menu--dropdown {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 20px calc(16px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    box-shadow: none;

    /*
     * Flat field with two soft blooms rather than a linear gradient, which at
     * this size reads as muddy purple. White on this ground is 16:1.
     */
    background-color: #2b1743;
    background-image:
      radial-gradient(120% 80% at 12% 0%, rgba(73, 43, 112, 0.95) 0%, rgba(73, 43, 112, 0) 62%),
      radial-gradient(90% 60% at 100% 100%, rgba(230, 75, 56, 0.20) 0%, rgba(230, 75, 56, 0) 60%);
  }

  /*
   * The builder opens this by stretching it from a zero height line, which
   * squashes every glyph on the way. A fade and a short rise instead.
   */
  .elementor-menu-toggle:not(.elementor-active) + .elementor-nav-menu--dropdown {
    display: block !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) !important;
    transition: opacity 180ms cubic-bezier(0.3, 0, 0.8, 0.15),
                transform 180ms cubic-bezier(0.3, 0, 0.8, 0.15),
                visibility 0s linear 180ms;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown {
    display: flex !important;
    flex-direction: column;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) !important;
    animation: none !important;
    transition: opacity 260ms cubic-bezier(0.05, 0.7, 0.1, 1),
                transform 260ms cubic-bezier(0.05, 0.7, 0.1, 1),
                visibility 0s;
  }

  /* A band at the top of the panel carrying the wordmark, so it is obvious
     whose menu this is. Drawn rather than moved: the real logo sits under the
     announcement bar, whose height changes when it is dismissed. */
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown::before {
    content: "";
    display: block;
    width: 108px;
    height: 24px;
    margin: 20px 0 18px;
    background-image: url("/wp-content/uploads/2023/05/Braintoy_white-300x62.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left center;
    border-bottom: 0;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown > ul {
    max-width: 520px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    flex-direction: column;
    /*
     * Grow to fill the panel, never shrink below the height of the rows.
     * Clamped instead, the rows that do not fit are pushed off the top edge
     * by the auto margin below, out of reach of any scrolling, the panel
     * having nothing to scroll. Two open groups are enough to lose Home.
     */
    flex: 1 0 auto;
    width: 100%;
  }

  /*
   * Entries in Nunito, the site's own face.
   *
   * No rules between rows: at this size the type separates itself.
   */
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.elementor-item,
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.elementor-sub-item {
    font-family: "Nunito", sans-serif !important;
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 0;
    /* the widget ships an 8px transparent left border, which shifts any row
       that gains a marker sideways by 8px */
    border-left: 0 !important;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.elementor-item {
    position: relative;
    min-height: 52px;
    padding: 12px 0 12px 18px;
    color: #ffffff;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    letter-spacing: -0.01em;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.elementor-sub-item {
    min-height: 44px;
    padding: 10px 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.3;
  }

  /* Only on a device that actually hovers, so a tapped row does not keep its
     tint after the page has moved on. */
  @media (hover: hover) {
    /* only the sub entries change here; the others are already white */
    .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.elementor-sub-item:hover {
      color: #ffffff;
    }
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.elementor-item:focus-visible,
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.elementor-sub-item:focus-visible {
    outline: 2px solid #ff8a73;
    outline-offset: -2px;
    color: #ffffff;
  }

  /*
   * The page you are on. A dot in the gutter every row already reserves, so
   * nothing shifts. The builder paints this row solid orange across its whole
   * width, which is a bar with text inside it rather than a marker.
   */
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.elementor-item-active,
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown .current-menu-item > a.elementor-item {
    background: transparent !important;
    color: #ff8a73 !important;
    box-shadow: none;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown .current-menu-item > a.elementor-item::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #ff8a73;
  }

  /*
   * A parent whose children are showing. The builder marks it highlighted and
   * paints a solid orange bar; the parent and its children become one soft
   * card instead, so a group reads as a group.
   */
  /*
   * The group whose links are showing takes the accent colour, so it is clear
   * which heading the list belongs to. The colour only, not the full width
   * block the builder paints.
   *
   * The lighter accent, not the brand orange, which is 2.9 to 1 on this
   * ground. This is 7 to 1 on the flat colour and 4.9 to 1 where the bloom is
   * brightest, which is where the headings sit.
   */
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.highlighted {
    background: transparent !important;
    color: #ff8a73 !important;
    font-weight: 800 !important;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.highlighted .sub-arrow {
    color: #ff8a73;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown .menu-item-has-children:has(> a.highlighted) {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    margin: 4px 0;
    padding-bottom: 6px;
  }

  /* The arrow is inside the link rather than a control of its own, so it is
     drawn as a plain chevron rather than as something that looks pressable.
     It turns over when the group opens. */
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown .sub-arrow {
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown .sub-arrow svg,
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown .sub-arrow i {
    fill: currentColor;
    color: inherit;
    transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.highlighted .sub-arrow svg,
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown a.highlighted .sub-arrow i {
    transform: rotate(180deg);
  }

  /*
   * Children in columns. Solutions has eleven, which is 616px as a single
   * stack and does not fit on a phone. Two columns brings it to about 264px.
   * Below 360 there is not room for two, so it falls back to one.
   */
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown .sub-menu {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding-left: 18px;
  }

  /* Only a group that is open. Applied to every submenu it would override the
     display none that keeps the closed ones closed, and the whole menu would
     stand permanently expanded. The important beats the inline display the
     script writes as it opens one. */
  @media (min-width: 360px) {
    .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown li:has(> a.highlighted) > .sub-menu:has(> li:nth-child(7)) {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      column-gap: 12px;
    }
  }

  @media (min-width: 600px) {
    .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown li:has(> a.highlighted) > .sub-menu:has(> li:nth-child(7)) {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  /*
   * Connect is already last in the markup, so pushing it to the bottom leaves
   * the reading order alone. It is the one filled action on the panel.
   *
   * The deeper red, not the brand orange: white on that is 3.9 to 1, which
   * fails at this text size.
   */
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown > ul > li:last-child {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown > ul > li:last-child > a.elementor-item {
    justify-content: center;
    min-height: 52px;
    padding-left: 0;
    border-radius: 12px;
    background: #c9391f !important;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown > ul > li:last-child > a.elementor-item::before {
    content: none;
  }

  /*
   * The page behind must not scroll while the panel is over it.
   *
   * Scoped inside this query deliberately: the builder never clears the open
   * class on resize, so outside it, opening the menu on a tablet and turning
   * the device landscape leaves the page unscrollable with no menu in sight.
   */
  html:has(.elementor-menu-toggle.elementor-active),
  body:has(.elementor-menu-toggle.elementor-active) {
    overflow: hidden;
  }
}

@media (max-width: 1024px) {
  /* The builder emits a margin on this element keyed to both the page id and
     the widget id and marked important. Naming the container class carries
     enough weight to answer it without naming the ids, which change per page. */
  .elementor-widget-nav-menu .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown.elementor-nav-menu__container,
  .elementor-widget-nav-menu .elementor-menu-toggle:not(.elementor-active) + .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    margin: 0 !important;
  }

  /* The colour of an open group is keyed the same way, so it needs the same
     weight to answer. Without this the builder's own grey wins and the open
     heading is the hardest row on the panel to read. */
  .elementor-widget-nav-menu .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown.elementor-nav-menu__container a.highlighted,
  .elementor-widget-nav-menu .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown.elementor-nav-menu__container a.highlighted .sub-arrow {
    color: #ff8a73 !important;
  }
}

@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  .elementor-menu-toggle:not(.elementor-active) + .elementor-nav-menu--dropdown,
  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown {
    transform: none !important;
    transition-duration: 120ms;
  }

  .elementor-menu-toggle.elementor-active + .elementor-nav-menu--dropdown .sub-arrow svg {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
 * 16. The header band on phones and tablets
 * -------------------------------------------------------------------------- */

/*
 * The header is fixed with no background of its own, so everywhere but the
 * dark homepage hero the white wordmark and menu button disappear into
 * whatever passes behind them.
 *
 * Given the same colour as the menu panel, so opening the menu is one surface
 * growing rather than a new one appearing. Transparent with a blur behind it;
 * where the browser cannot blur, the first colour applies and is solid.
 *
 * Only up to 1024. The desktop header is unchanged.
 */
@media (max-width: 1024px) {
  .elementor-location-header > .elementor-top-section:has(.elementor-menu-toggle):first-of-type {
    background-color: rgba(43, 23, 67, 0.90);
  }

  @supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
    .elementor-location-header > .elementor-top-section:has(.elementor-menu-toggle):first-of-type {
      background-color: rgba(43, 23, 67, 0.80);
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
    }
  }

  /* The announcement bar keeps its own colour and sits on top of the band. */
  .elementor-location-header > .elementor-top-section:has(.elementor-menu-toggle):first-of-type .elementor-element-94a0ddc {
    position: relative;
    z-index: 1;
  }

  /*
   * The three product pages draw their own header, which the rule above never
   * reached. Same colour, same blur, same wordmark treatment.
   */
  .navbar {
    background: rgba(43, 23, 67, 0.80) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom-color: rgba(255, 255, 255, 0.10);
  }

  .navbar .logo-text {
    color: #ffffff;
  }

  .navbar .nav-actions .demo-btn {
    background: #c9391f;
    color: #ffffff;
    border-color: transparent;
  }

  .navbar .mobile-toggle span {
    background: #ffffff;
  }
}
/* --------------------------------------------------------------------------
 * 17. The product page menu, brought in line with section 15
 * -------------------------------------------------------------------------- */

/*
 * The three product pages carry their own header, so none of section 15
 * reaches them. Everything here mirrors it, against the classes those pages
 * already use. The breakpoint is 1024 to match section 15.
 */
@media (max-width: 1024px) {
  .mobile-toggle {
    display: flex !important;
  }

  .nav-links:not(.active) {
    display: none;
  }

  .nav-links.active {
    position: fixed;
    inset: 0;
    /* The header on these pages carries a backdrop filter, and that makes it
       the box a fixed child measures itself against rather than the screen. A
       percentage height resolves against the header: a panel 108px tall. */
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9998;
    margin: 0;
    padding: 62px 20px calc(80px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    box-shadow: none;
    background-color: #2b1743;
    background-image:
      radial-gradient(120% 80% at 12% 0%, rgba(73, 43, 112, 0.95) 0%, rgba(73, 43, 112, 0) 62%),
      radial-gradient(90% 60% at 100% 100%, rgba(230, 75, 56, 0.20) 0%, rgba(230, 75, 56, 0) 60%);
  }

  .nav-links.active a {
    font-family: "Nunito", sans-serif;
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 12px 0 12px 18px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    border-bottom: 0;
  }

  @media (hover: hover) {
    .nav-links.active a:hover {
      color: #ff8a73;
    }
  }

  .nav-links.active a:focus-visible {
    outline: 2px solid #ff8a73;
    outline-offset: -2px;
  }

  .nav-links.active a.active,
  .nav-links.active a[aria-current="page"] {
    position: relative;
    color: #ff8a73;
  }

  .nav-links.active a.active::before,
  .nav-links.active a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #ff8a73;
  }

  /* The link back to the main site leaves the page rather than moving within
     it, so it is quieter and set below the rest. */
  .nav-links.active .nav-link-back {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
  }

  /*
   * The burger becomes the close control, so the open panel shows a way out.
   */
  .nav-links.active ~ .nav-actions .mobile-toggle {
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
  }

  .nav-links.active ~ .nav-actions .mobile-toggle span {
    background: #ffffff;
    transition: transform 200ms cubic-bezier(0.2, 0, 0, 1), opacity 120ms linear;
  }

  .nav-links.active ~ .nav-actions .mobile-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-links.active ~ .nav-actions .mobile-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-links.active ~ .nav-actions .mobile-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Book a Demo is what these pages exist to get, so it is not left behind
     the panel. It comes to the bottom, where a thumb reaches. */
  .nav-links.active ~ .nav-actions .demo-btn {
    position: fixed;
    left: 20px;
    right: 20px;
    /* Offset from the top, not the bottom. The header carries a backdrop
       filter, so it is the box this is measured against, and a bottom offset
       puts the button 16px from the bottom of the header rather than of the
       screen. The header sits at the top of the screen, so measuring down from
       there lands correctly. */
    top: calc(100dvh - 68px - env(safe-area-inset-bottom, 0px));
    bottom: auto;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 12px;
    background: #c9391f;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: none;
  }

  /* Scoped inside the query for the same reason as section 15: the class is
     not cleared on resize, and outside a query this leaves the page locked at
     desktop width with nothing on screen to explain it. */
  html:has(.nav-links.active),
  body:has(.nav-links.active) {
    overflow: hidden;
  }
}

@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  .nav-links.active ~ .nav-actions .mobile-toggle span {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
 * 18. Room for the hero under the header
 * -------------------------------------------------------------------------- */

/*
 * THE HEADING BEHIND THE HEADER ON THE EXPORTED PAGES, WHERE IT IS ARITHMETIC
 * RATHER THAN A GUESS. Without this, eight of them put the heading behind the
 * header on a short phone: financial-services -18, solutions -15, agriculture,
 * automotive, insurance and telecommunications -4, community and
 * manufacturing -1, all at 375x667.
 *
 * Their hero column is min-height 90vh with its contents centred, so the middle
 * of the band, and the heading sitting in it, rises as the screen gets
 * shorter while the header stays where it is. Down financial-services:
 *
 *     1000px tall  +132     844  +62     740  +15     667  -18     640  -30
 *
 * which is 0.45 of the viewport less 318, crossing nought around 705. The
 * announcement bar is NOT involved: dismissing it shrinks the header and moves
 * the content up by the same amount, so the shortfall is identical either way.
 *
 * So the correction is that line solved for a comfortable gap, plus the 10px of
 * its own padding this replaces: 368 minus 45vh, held at or above nought by
 * max(). It is 70px on the shortest phones, 17px at 780 and NOTHING from 818 up.
 * No breakpoint to pick, no effect on any screen that is clear without it, and
 * at 1440x900 it adds exactly 0.
 *
 * With it the worst page stands at +17, and all eight clear.
 */
.elementor-widget-wrap:has(h1.elementor-heading-title) {
  padding-top: max(0px, calc(368px - 45vh)) !important;
}

/*
 * Width comes into it as well as height, because a narrow screen wraps the
 * heading onto another line, and a taller block centred in the same band starts
 * HIGHER. Solutions is the one that shows it: clear by 14 at 375x640, still 7
 * behind at 360x640, on the identical rule. So phone widths get the same line
 * carrying more, which covers the extra line and fades out the same way. The
 * margin is deliberately past what 360x640 needs: it is the tightest size on the
 * site at 5px on the smaller number, and a different font fallback would eat it.
 */
@media (max-width: 400px) {
  .elementor-widget-wrap:has(h1.elementor-heading-title) {
    padding-top: max(0px, calc(400px - 45vh)) !important;
  }
}

/* --------------------------------------------------------------------------
 * 19. Spacing on phones and tablets
 * -------------------------------------------------------------------------- */

/*
 * The exported pages have no spacing scale. Down the homepage at 390 the left
 * inset runs 30, 10, 5, 100, 40, 50, 10, 20, 30, 30, 35, 20, with gaps from
 * 10px to 493px. The hand-built pages use 24px insets and 56px padding.
 *
 * Not an attempt to normalise every section, which would be a rewrite of the
 * export. A floor: nothing touches the edge of the screen, nothing collides
 * with what is above it, and the worst are corrected by name.
 *
 * important throughout: the builder keys each section's padding to the page id
 * and element id, which outweighs anything written against the class alone,
 * and naming those ids here would work on one page only.
 */
@media (max-width: 1024px) {
  /*
   * The LinkedIn panel has no top spacing of its own and takes whatever the
   * section above leaves, measured from 0 to 105px.
   */
  .elementor-element-2e6ed93c {
    padding-top: 44px !important;
  }

  /* Inside it, this keeps the heading and the line under it from touching. */
  .elementor-element-7468db3c {
    margin-bottom: 14px !important;
  }

  /* And its View All Posts, which the export leaves 10px under the cards at
     tablet width. */
  .elementor-element-2cbbb00c {
    margin-top: 26px !important;
  }
}

/* --------------------------------------------------------------------------
 * 20. Card rows on tablets
 * -------------------------------------------------------------------------- */

/*
 * The builder keeps columns side by side until 768, so a tablet gets the
 * desktop arrangement in a fraction of the width. Below 1024 a row may wrap,
 * and a picture at the head of a column stops growing with it.
 */
@media (max-width: 1024px) {
  .elementor-inner-section:not(.elementor-location-footer *) > .elementor-container > .elementor-column:has(.elementor-widget-image) .elementor-widget-image img {
    max-width: 120px;
  }

  .elementor-inner-section:not(.elementor-location-footer *) > .elementor-container {
    flex-wrap: wrap;
    row-gap: 24px;
  }
}

/* --------------------------------------------------------------------------
 * 22. The drifting dots on the hand-built heroes
 * -------------------------------------------------------------------------- */

/*
 * Sits behind the words rather than over them, and takes no clicks, so it is
 * decoration and nothing more. The plugin's own wrapper on the other pages is
 * positioned the same way.
 */
.bt-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bt-particles canvas {
  display: block;
}

/* Faint behind the words, which stand in the left half of a product site's
   hero, and full beside them, around the dashboard; where the hero is one
   column the words take its whole width, so the lines are faint across it. */
.hero > .bt-particles {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 50%, #000 66%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 50%, #000 66%);
}

@media (max-width: 992px) {
  .hero > .bt-particles {
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 0.2;
  }
}

/* Everything the hero actually says stays above it. The products opening's
   own is beside it, in braintoy/components/openers/film_hero.css. */
.hero > *:not(.bt-particles) {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
 * 24. What a card does when you point at it
 *
 * Everything here is behind hover: hover, so a touch screen gets none of it.
 * What moves is transform and opacity, which the browser hands to the
 * compositor, rather than anything that would move the page around.
 *
 * The transitions name the properties they animate. The theme writes
 * transition: all on these, which asks the browser to watch every animatable
 * property for a change on every frame.
 * -------------------------------------------------------------------------- */
@media (hover: hover) {
  /* Article cards. These already carry a shadow, so it deepens rather than
     appears. */
  .ha-pg-item {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }

  .ha-pg-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ha-pg-item {
    transition: none;
  }

  .ha-pg-item:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
 * 28. Something else the dark ground swallows
 *
 * The placeholders are white on the dark ground. Worth knowing: these fields
 * use the placeholder as the label, so at white they read much like a value
 * somebody already typed.
 * -------------------------------------------------------------------------- */

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder,
:root[data-theme="dark"] select::placeholder {
  color: #fff;
  opacity: 1;
}

/* --------------------------------------------------------------------------
 * 29. Continue Reading
 *
 * A pill at the foot of a card that already carries a picture, a headline, a
 * byline and a summary. As plain text it is the quietest thing on the card,
 * and it is the only part meant to be clicked.
 *
 * The Learn More button on the homepage is a gradient rim over white that
 * fills to a tint on hover; this is the other way round, an outline that
 * fills solid, so the two read as one family without being one button. The
 * arrow slides, which is the piece they do share.
 * -------------------------------------------------------------------------- */

.ha-pg-readmore a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid var(--bt-accent-ink, #492b70);
  border-radius: 999px;
  background-color: transparent;
  color: var(--bt-accent-ink, #492b70);
  /* The builder writes weight and hover colour through rules keyed to this
     widget's own ids, which outrank anything not keyed the same way. Mirroring
     those ids here would break the day a widget is rebuilt, so the two
     declarations that lose are marked instead. */
  font-weight: 700 !important;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease,
              transform 200ms cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 200ms ease;
}

.ha-pg-readmore a:hover,
.ha-pg-readmore a:focus-visible {
  background-color: var(--bt-accent-ink, #492b70);
  /* Without this the builder turns the label the brand red, which on the plum
     it sits on measures 2.91 to one. */
  color: var(--bt-paper, #fff) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -10px rgba(73, 43, 112, 0.6);
}

/* A purple shadow is nothing on a near black page. */
:root[data-theme="dark"] .ha-pg-readmore a:hover,
:root[data-theme="dark"] .ha-pg-readmore a:focus-visible {
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.8);
}

@media (prefers-reduced-motion: reduce) {
  .ha-pg-readmore a {
    transition: none;
  }

  .ha-pg-readmore a:hover,
  .ha-pg-readmore a:focus-visible {
    transform: none;
  }
}

/*
 * The tilt. Each card turns toward the direction it is travelling and squares
 * up as it reaches the middle, so the row reads as something being turned
 * through rather than a strip sliding past.
 *
 * Driven by the card's own position in the scroller, so it follows a thumb
 * exactly and runs off the main thread. Where the browser cannot do that,
 * nothing is applied and the row is an ordinary snap carousel.
 */
/* 8 degrees and a light scale: enough to read as turning, little enough that
   the card either side stays legible as a card rather than receding into the
   background and taking the only clue that the row goes on with it. */
@keyframes bt-swipe-tilt {
  from { transform: rotateY(-8deg) scale(0.96); }
  50%  { transform: rotateY(0deg) scale(1); }
  to   { transform: rotateY(8deg) scale(0.96); }
}

/* --------------------------------------------------------------------------
 * 29. Page titles on phones and tablets
 *
 * Without this an exported page carries the desktop treatment on a phone. On
 * /agriculture/ at 390 the header is fixed and 183 tall with the announcement
 * bar above it, and the page title starts at 154, so its first line is drawn
 * behind the header and cut in half. The title is 58.5px, which runs to five
 * lines and 293px on a screen 375 wide.
 *
 * Keyed to the heading rather than to each page's section ids, which differ on
 * every page while this shape does not. A heading inside .bt-product-slider
 * is left out.
 * -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .elementor-widget-heading:not(.bt-product-slider *):has(h1.elementor-heading-title) {
    padding-top: 64px;
  }

  h1.elementor-heading-title:not(.bt-product-slider *) {
    font-size: 34px !important;
    line-height: 1.15 !important;
  }

  /* The headings under it are 48px, which wraps to three lines and reads as a
     second page title rather than as a heading below one. */
  h2.elementor-heading-title:not(.bt-product-slider *) {
    font-size: 27px !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 480px) {
  .elementor-widget-heading:not(.bt-product-slider *):has(h1.elementor-heading-title) {
    padding-top: 56px;
  }

  h1.elementor-heading-title:not(.bt-product-slider *) {
    font-size: 29px !important;
  }

  h2.elementor-heading-title:not(.bt-product-slider *) {
    font-size: 24px !important;
  }
}

/* --------------------------------------------------------------------------
 * 13. Dark mode
 * --------------------------------------------------------------------------
 *
 * The colours are baked into generated page-builder CSS across the whole
 * export, so tools/dark_mode.py rewrites every one that paints a surface or
 * writes text from a literal into var(--token, <the literal>). Light mode
 * defines none of these tokens, so every fallback holds and nothing there
 * changes. Dark mode defines them and the whole site moves at once.
 *
 * The script in each page's head resolves the reader's stored choice, or the
 * machine's setting if they have not made one, and writes the answer to
 * data-theme before anything is painted. So every rule here keys on one
 * selector and is written once, rather than each of them appearing twice, once
 * for the attribute and once for a media query.
 *
 * The cost is that dark needs script. A visitor without it gets light, which is
 * the whole site working in one consistent set of colours; keying the surfaces
 * on a media query and leaving the rest behind would have given them a dark
 * page with dark headings on it.
 * -------------------------------------------------------------------------- */

/*
 * THE MUTED GREY, WHICH IS ONE GREY HERE. tools/dark_mode.py wraps the light
 * page's secondary text as var(--bt-muted, <its own colour>), so the fallback
 * carries the light value. Those fallbacks are eight different greys, and
 * three of them cannot be read: #8c8c8c is 3.36 to one on white and is what
 * the LinkedIn panel's subtitle and the post bylines are written in, #7a7a7a
 * is 4.29, #69727d likewise. AA wants 4.5.
 *
 * Naming it once for the light page sets every one of them, in every file
 * that carries the fallback, without touching any of them: #6f6879 is 5.34 on
 * white and is one of the eight, so it is not a new colour on the site. The
 * greys darker than it, #545454 and #4a4159, lighten to it and still clear AA
 * comfortably. The dark theme is unaffected: the block below is more specific
 * and still wins.
 */
:root {
  --bt-muted: #6f6879;
}

/* and inside a section set at night in both themes (data-night, looks.py) */
[data-night],
:root[data-theme="dark"] {
  --bt-paper: #14101c;
  --bt-sunk: #1c1629;
  --bt-ink: #f0eaf7;
  --bt-muted: #a79fb6;
  --bt-band: #3a2158;
  --bt-band-deep: #1e1230;
  --bt-accent-ink: #c8aef0;
  --bt-line: #2f2742;
}

/*
 * The page itself. These come from the theme's own stylesheets, which are
 * vendor files and are not rewritten, so they are named here. Each carries the
 * light value as its fallback, so one rule serves both modes.
 */
body,
.container-wrap,
#ajax-content-wrap {
  background-color: var(--bt-paper, #fff);
}

/*
 * Headings. The theme colours h1 to h4 outright in a stylesheet that is not
 * rewritten, at #545454, which is 2.47 to one on the dark page. Our own bands
 * set their own and are left out of this.
 */
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4 {
  color: var(--bt-ink);
}

:root[data-theme="dark"] #bt-courses h1, :root[data-theme="dark"] #bt-courses h2,
:root[data-theme="dark"] #bt-courses h3, :root[data-theme="dark"] #bt-courses h4 {
  color: inherit;
}

/* --------------------------------------------------------------------------
 * The bands this project built
 *
 * Each keeps its colours in its own custom properties, which is what makes
 * this short: the palette is redefined and everything inside follows. The
 * drawings are left alone. They are pictures made of hundreds of fills that
 * only work together, and a picture keeps its own light ground the way a
 * photograph does.
 * -------------------------------------------------------------------------- */

:root[data-theme="dark"] #bt-courses {
  --ink: #f0eaf7;
  --plum: #c8aef0;
  /* The brand red is left where it is. It is the eyebrow's colour AND the
     button's background, and lightening it for the first would cost the
     second its contrast with white. On the band's dark ground it reads
     4.57. */
  --red: #e64b38;
  --line: #332a47;
  --muted: #a79fb6;
  --green: #4fbfa3;
  --paper: #1c1629;
  --gold: #e0be4e;
}

:root[data-theme="dark"] #bt-courses .bt-band {
  background: radial-gradient(120% 120% at 12% 8%, #1e1731 0%, #191327 52%, #150f22 100%);
}

/* --------------------------------------------------------------------------
 * 14. The dark mode switch
 * -------------------------------------------------------------------------- */

.bt-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 14px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.bt-theme:hover,
.bt-theme:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

.bt-theme:focus-visible {
  outline: 3px solid #ffa85c;
  outline-offset: 3px;
}

.bt-theme svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce) {
  .bt-theme { transition: none; }
}

/*
 * Surfaces that come from plugin stylesheets, which are vendor files and are
 * not rewritten. Each carries its light value as the fallback, so one rule
 * serves both modes.
 */
.ha-card > .elementor-widget-container {
  background-color: var(--bt-paper, #fff);
}

/*
 * In the dark that surface is the same colour as the page behind it, and the
 * card carries no border, so the three feed posts dissolve into the background
 * and read as loose text. The surface lifts to the sunk tone and takes a border
 * at the same 3.2 to one the quote cards use.
 */
:root[data-theme="dark"] .ha-card > .elementor-widget-container {
  background-color: var(--bt-sunk, #fff);
  border: 1px solid #71628f;
}

/*
 * A colour the rewrite could not reach. The split heading is a theme animation
 * that colours its words from a rule the rewrite does not see.
 */
:root[data-theme="dark"] .nectar-split-heading h1,
:root[data-theme="dark"] .nectar-split-heading h2,
:root[data-theme="dark"] .nectar-split-heading h3,
:root[data-theme="dark"] .nectar-split-heading span {
  color: var(--bt-accent-ink);
}

/*
 * The shape dividers between sections. Each one fills with the colour of what
 * is below it, which is the page, so in dark it follows the page.
 */
:root[data-theme="dark"] .elementor-shape-fill {
  fill: var(--bt-paper);
}

/* In the small screen panel the entries stack, so the button gets a row of its
   own and sits where a reader's thumb already is. */
@media (max-width: 1024px) {
  .elementor-nav-menu--dropdown .bt-theme {
    margin-left: 0;
  }
}

/*
 * The homepage courses cards. Where every course in a group starts the same way,
 * that part is lifted out and shown once above the list, so five lines each
 * beginning Applied Machine Learning become one line and five short ones.
 */
#bt-courses .col__pre {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

/*
 * The words marked inside a card's own title.
 * On the cream card the band red reaches 3.54 against 4.5, so light gets a
 * darker mix of it. The dark card clears it at the ordinary red.
 */
#bt-courses .col__hi {
  color: #c23a24;
}

:root[data-theme="dark"] #bt-courses .col__hi {
  color: var(--red, #e64b38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #bt-courses .col__hi {
    color: var(--red, #e64b38);
  }
}

/* --------------------------------------------------------------------------
 * 31. The menu's own dropdowns in the dark
 *
 * The entries under Products, Courses and the rest are written in the theme's
 * body grey, 73,76,79, which is chosen for a white panel. The panel goes dark
 * with the page and the grey does not: 2.17 to one, which is a menu you cannot
 * read. White, which measures 16.
 * -------------------------------------------------------------------------- */

:root[data-theme="dark"] .elementor-sub-item,
:root[data-theme="dark"] ul.sub-menu a,
:root[data-theme="dark"] .sub-menu .elementor-item {
  color: #fff;
}

/* and the one you are pointing at keeps the accent it has in light */
:root[data-theme="dark"] .elementor-sub-item:hover,
:root[data-theme="dark"] .elementor-sub-item:focus-visible,
:root[data-theme="dark"] ul.sub-menu a:hover,
:root[data-theme="dark"] ul.sub-menu a:focus-visible {
  color: var(--bt-accent-ink, #c8aef0);
}

/* --------------------------------------------------------------------------
 * 41. One scroll reveal for the whole site
 *
 * Generated by tools/patch_scroll_rise.py, which writes the same selectors into
 * braintoy-reveal.js. Edit the tool, not this.
 *
 * The script adds bt-rise-js to the root, then bt-in to each element as it
 * arrives. An observer rather than a scroll listener, so it costs nothing per
 * frame, and only opacity and transform move, so nothing here can reflow.
 *
 * animation-timeline: view() would be better and does not work here. It binds
 * to the nearest scroll container, which on these pages is BODY at
 * overflow:hidden while HTML is what scrolls, so the timeline never advances.
 * The reasoning is in the tool.
 * -------------------------------------------------------------------------- */

/* Behind bt-rise-js, so a script that never loads leaves the page readable, and
   prefers-reduced-motion never gets here because the script returns first.

   EVERY selector carries that prefix, not just the first. A comma list scopes
   only the selector the prefix is written against, so written once it would
   leave every other selector setting opacity:0 unconditionally, on every
   browser and every page, and under reduced motion nothing puts the opacity
   back. */
  html.bt-rise-js .bt-reveal {
  opacity: 0;
  transform: translateY(18px);
}

  html.bt-rise-js .bt-reveal.bt-in {
  opacity: 1;
  transform: none;
  transition: opacity 620ms cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 620ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* --------------------------------------------------------------------------
 * 48. Tap targets on a phone
 *
 * tools/mobile_check.py measures the site at 360 and 414 wide. Nothing on it
 * scrolls sideways at either size; these are the controls too small to hit.
 *
 * WHAT IS LEFT, AND WHY. The author bylines on the news pages are 74 by 19 and
 * sit inside "By Michelle", which 2.5.8 exempts as an inline link.
 *
 * WHAT IS DELIBERATELY LEFT. Labels at 11 and 11.5px: the eyebrows, the counts
 * and the field names in the calendar. They are uppercase and letterspaced,
 * which is a label rather than reading matter, and raising them changes the
 * typography of every band on the site to answer a number that is not about
 * labels.
 * -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  /* The button on the bar across the top. 29 tall on a phone. */
  [data-news-bar] .elementor-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  [data-news-bar] .elementor-widget-button { padding: 4px 0; }

  /* The address in the footer, standing on its own line at 23 tall: one pixel
     under the floor, which is still under it. */
  a[href^="mailto:"],
  .meta-author a,
  .vcard a {
    display: inline-block;
    padding: 4px 0;
  }
}

/* --------------------------------------------------------------------------
 * 40. The article and post titles, against a header that changes height
 *
 * The header is fixed and not a fixed height: on a 390 wide screen the
 * announcement bar wraps onto two lines, so the pair is 216 tall with the bar
 * and 105 without. js/braintoy-header-offset.js measures it and publishes
 * --bt-header-h.
 *
 * The article template reserves 34 pixels above its title, which clears a
 * header with no bar and nothing else: with the bar showing, the title of a
 * post would sit behind the menu.
 *
 * So it gains the difference between the header as it stands and the header
 * with no bar, and its own 34 becomes 70. The extra 36 is for the category
 * pill above the title, which is the real first thing on the page and at 34
 * is behind the menu whether the bar is dismissed or not. With the bar
 * dismissed, or with no script at all, that difference is nought.
 *
 * Scoped to .blog-title on purpose. The other templates here have their own
 * relationship with the header, and a blanket rule keyed on the page builder
 * pulls the two legal pages up behind the menu.
 * -------------------------------------------------------------------------- */

@media (max-width: 781px) {
  /* The 34 comes from the theme, in a rule carrying an id:
     #page-header-bg[data-alignment-v="middle"]:not(.fullscreen-header)
     .span_6 .inner-wrap. A rule of two classes cannot outrank that however
     late it is in the file, which is why this one is marked important rather
     than being written more cleverly. */
  #page-header-bg .span_6 .inner-wrap,
  .blog-title .inner-wrap {
    padding-top: calc(70px + var(--bt-header-h, 105px) - 105px) !important;
  }

  /* The two pages whose heading is a split heading rather than a post title
     move the same way and by the same amount, so they take the same rule. The
     heading block carries no padding of its own, which is why this adds rather
     than replaces. */
  .container-wrap .nectar-split-heading {
    padding-top: calc(var(--bt-header-h, 105px) - 105px);
  }
}

/* --------------------------------------------------------------------------
 * 41. The page builder heroes, against a header that changes height
 *
 * These heroes are a fixed height with their content centred in it, so the
 * heading sits at the same place on the screen whatever the header is doing.
 * That reads correctly with the announcement bar showing, which is what they
 * are drawn against, and leaves a hole exactly the height of the bar when it
 * is dismissed.
 *
 * Each hero is pulled up by however much shorter the header currently is than
 * the height it is drawn for. That is nothing while the bar is showing.
 *
 * THE NUMBER IS THE HEADER WITH THE BAR, 202 on a phone, so it has to change
 * when the bar does. If the bar changes height, measure it and change these:
 * leaving it stale does not break a page, it just sits the difference too
 * high.
 *
 * WRITTEN OUT ONE SECTION AT A TIME, on purpose. A single rule keyed on the
 * page builder pulls the two legal pages up behind the menu, because their
 * content already moves with the bar and needs no shifting at all. There is
 * no property that says "only if you are not already doing this", so the
 * sections that need it are named.
 *
 * The pages behind each id are in the comment beside it.
 *
 * Marked important because the page builder writes its own margins through a
 * selector carrying the page's id as well as the element's, which a single
 * class cannot outrank however late it appears in the file.
 * -------------------------------------------------------------------------- */

@media (max-width: 781px) {
  /* the news page, the four category archives and the author archive */
  .elementor-element-c24ba66,
  /* three article pages built on the page builder rather than the theme */
  .elementor-element-52580a4 {
    margin-top: calc(var(--bt-header-h, 202px) - 202px) !important;
  }
}

/* --------------------------------------------------------------------------
 * 44. The footer's headings and its email address
 *
 * Info, Recent Posts, Contact and connect@braintoy.ai are the brand red on the
 * footer's purple, which measures 2.91 to one where AA wants 4.5. It is the
 * dimmest text on the site and it is on every page.
 *
 * Red on that purple cannot be fixed by darkening: the red is already the
 * lighter of the two, so contrast comes from going lighter still. #fa8c79 is
 * the same hue lifted until it clears, at 4.88, and reads as the warm accent it
 * is meant to be rather than as a different colour.
 *
 * Scoped to the two things that are red. The other footer links are white and
 * are left alone, and the mailto in the social row is an icon rather than
 * words, which is why this asks for one inside a paragraph.
 *
 * Marked important for the same reason section 40 is: the builder writes
 * .elementor-1402 .elementor-element.elementor-element-96a898c
 * .elementor-heading-title, which is four classes. Two classes and an element
 * cannot outrank that however late in the file it is written.
 * -------------------------------------------------------------------------- */

.elementor-location-footer h4.elementor-heading-title,
.elementor-location-footer p > a[href^="mailto:"] {
  color: #fa8c79 !important;
}

/* --------------------------------------------------------------------------
 * 45. The titles that became first-level headings
 *
 * On eight pages the export writes the title as an h2, in the right place and
 * at the right size, which leaves the announcement bar the highest heading on
 * the page. tools/patch_page_h1.py raises each one and marks it, and this is
 * the half of that which keeps the page looking the same.
 *
 * The theme sizes h1 at 90px and h2 at 60. The five listing pages do not feel
 * it, because the builder pins their heading at 40 outright. The three case
 * studies do, and 90px on a title the length of theirs is half a screen of
 * heading before the article starts.
 *
 * So a singular page's title keeps the 60 of an h2. The archive pages are not
 * named here and do not need to be. On a phone and a tablet nothing is pinned
 * at all: section 29 sizes a page title and gives it room under the fixed
 * header.
 * -------------------------------------------------------------------------- */

@media (min-width: 1025px) {
  body.wp-singular h1.bt-page-title {
    font-size: 60px;
    line-height: 60px;
  }
}

/* --------------------------------------------------------------------------
 * 46. Bold text is the same typeface as the text around it
 *
 * The theme ships this:
 *
 *     body b, body strong, body .bold { font-family: "Nunito", sans-serif; font-weight: 800; }
 *
 * A family of its own on bold text puts a bold word in a different face from
 * the sentence it stands in, wherever that sentence is set in anything else.
 *
 * Bold inherits whatever it sits in, which is what bold is for. The weight
 * stays: <b> should still be bold, in the face already being read. Same
 * specificity as the theme's rule and this sheet loads after it.
 */
body b,
body strong,
body .bold {
  font-family: inherit;
  font-weight: 800;
}

/*
 * AND THE TWO PLACES A FAMILY RULE ON <b> DOES NOT REACH.
 *
 * THE NAVIGATION, AT EVERY WIDTH. Section 15 sets the collapsed menu in Nunito
 * and reaches only the dropdown. This sets the menu of a wide screen in the
 * same face, so the site has one nav in one face at every width.
 *
 * !important, which is worth the sentence it takes to justify. The rule being
 * beaten is Elementor's own per-widget style:
 *
 *   .elementor-1375 .elementor-element.elementor-element-66a65f1
 *     .elementor-nav-menu .elementor-item { font-family: "Nunito", sans-serif; }
 *
 * That is four classes, and the only ways to outrank it are to match the widget
 * id, which is generated and changes whenever the header is re-exported from
 * WordPress, or to say important on a selector that describes what it is.
 * The second one survives a re-export. The first is a trap for whoever does it.
 *
 * THE TESTIMONIALS are blockquotes, which the theme gives a family of their
 * own. body blockquote is (0,0,0,2) against the theme's (0,0,0,1) and this
 * sheet loads after it.
 */
.elementor-nav-menu .elementor-item,
.elementor-nav-menu .elementor-sub-item {
  font-family: "Nunito", sans-serif !important;
}

body blockquote,
body blockquote span {
  font-family: inherit;
}

/* --------------------------------------------------------------------------
 * 43. Words over a photograph or moving lines
 *
 * Where a title stands on a photograph, or on lines that move, the picture is
 * softened under a deeper wash and the lines faded where the words are, so
 * nothing behind the words competes with reading them.
 * -------------------------------------------------------------------------- */

/* The news page, the four category archives and the author archive: the
   picture deeper under the band's own wash, and its moving lines faint across
   the middle of the band, where the title stands. */
.elementor-3813 .elementor-element.elementor-element-c24ba66 > .elementor-background-overlay {
  opacity: 0.9;
}

.elementor-element-c24ba66 > .ha-particle-wrapper {
  -webkit-mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0.2) 70%, #000);
  mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0.2) 70%, #000);
}

/* A post's photograph behind its category, title and date, and the one
   behind the link to the post before or after it: darkened, and blurred so
   none of its shapes stand behind the words, scaled a little so the blur's
   soft edge falls outside the frame that clips it. */
.single [data-post-hs=default_minimal] .page-header-bg-image:after {
  background-color: rgba(25, 25, 25, 0.7);
}

.single [data-post-hs=default_minimal] .page-header-bg-image-wrap,
.blog_next_prev_buttons[data-style=fullwidth_next_prev] ul li {
  overflow: hidden;
}

.single [data-post-hs=default_minimal] .page-header-bg-image,
.blog_next_prev_buttons[data-style=fullwidth_next_prev] ul .post-bg-img {
  filter: blur(10px);
  transform: scale(1.08);
}

.blog_next_prev_buttons[data-style=fullwidth_next_prev] ul .next-post:after,
.blog_next_prev_buttons[data-style=fullwidth_next_prev] ul .previous-post:after {
  opacity: 0.7;
}
