:root {
  --rar-navy: #0b2d4d;
  --rar-navy-deep: #071f37;
  --rar-copper: #bd6f47;
  --rar-cream: #f7f3ec;
  --rar-white: #ffffff;
}

html,
body {
  max-width: 100%;
  overflow-x: clip !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body .site-header {
  position: relative;
  z-index: 30;
  background: var(--rar-white);
  border-bottom: 1px solid #dfe5ea;
  box-shadow: 0 4px 18px rgba(7, 31, 55, 0.08);
}

body .site-header .header-inner {
  width: min(100% - 40px, 1460px);
  max-width: 1460px;
  min-height: 92px;
  margin-inline: auto;
  padding: 14px 0;
  gap: 24px;
}

body .site-header .site-branding {
  min-width: 0;
}

body .site-header .site-title a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--rar-navy);
  font-size: clamp(1.55rem, 2.3vw, 2.35rem);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-decoration: none;
}

body .site-header .site-title a::before {
  content: "";
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M8 30 32 10l24 20M13 27v27h38V27M26 54V38h12v16' fill='none' stroke='%230b2d4d' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body .site-header .site-description {
  margin: 5px 0 0 62px;
  color: #546578;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

body .site-header .site-navigation ul.menu {
  align-items: center;
  gap: 4px;
}

body .site-header .site-navigation a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--rar-navy-deep);
  font-weight: 750;
  text-decoration: none;
}

body .site-header .site-navigation a:hover,
body .site-header .site-navigation a:focus-visible {
  color: var(--rar-navy-deep);
  background: #edf3f7;
  outline: 3px solid #1771c8;
  outline-offset: 2px;
}

body .site-header .site-navigation .menu-item:last-child > a {
  margin-left: 8px;
  padding-inline: 24px;
  color: var(--rar-white);
  background: var(--rar-copper);
  box-shadow: 0 7px 18px rgba(126, 66, 35, 0.2);
}

body .site-header .site-navigation-toggle {
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  border: 2px solid var(--rar-navy);
  border-radius: 12px;
  color: var(--rar-navy);
  background: var(--rar-white);
}

body .site-navigation-dropdown {
  background: var(--rar-white);
  border-top: 1px solid #dfe5ea;
  box-shadow: 0 12px 24px rgba(7, 31, 55, 0.14);
}

body .site-navigation-dropdown a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--rar-navy-deep);
  font-weight: 750;
}

body .site-footer {
  background: var(--rar-navy-deep);
  color: var(--rar-white);
}

body .site-footer .footer-inner {
  width: min(100% - 40px, 1180px);
  max-width: 1180px;
  margin-inline: auto;
  padding-block: 30px;
  gap: 22px;
}

body .site-footer a,
body .site-footer .site-description,
body .site-footer .copyright {
  color: var(--rar-white);
}

body .site-footer .site-navigation a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  font-weight: 700;
}

body .site-footer .copyright p::before {
  content: "\00a9  2026 Rapid Appliance Rescue. ";
}

.rar-release-v5,
.rar-release-v5 .wrap,
.rar-release-v5 section,
.rar-release-v5 img,
.rar-release-v5 a,
.rar-release-v5 button {
  max-width: 100%;
}

.rar-release-v5 {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.rar-release-v5 .topline .wrap {
  flex-wrap: wrap;
  row-gap: 5px;
}

#wp-chatbot-chat-container {
  max-width: 56px !important;
  max-height: 64px !important;
}

@media (max-width: 992px) {
  body .site-header .header-inner {
    width: min(100% - 28px, 920px);
    min-height: 84px;
    padding-block: 12px;
  }

  body .site-header .site-branding {
    max-width: calc(100% - 64px);
  }

  body .site-header .site-title a {
    font-size: clamp(1.35rem, 5.5vw, 1.9rem);
    letter-spacing: -0.025em;
  }

  body .site-header .site-title a::before {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  body .site-header .site-description {
    margin-left: 56px;
    font-size: 0.64rem;
    letter-spacing: 0.13em;
  }

  body .site-navigation-dropdown .menu-item:last-child > a {
    color: var(--rar-white);
    background: var(--rar-copper);
  }

  #wp-chatbot-chat-container {
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 480px) {
  body .site-header .header-inner {
    width: min(100% - 20px, 460px);
  }

  body .site-header .site-title a {
    gap: 8px;
    font-size: clamp(1.18rem, 6.2vw, 1.55rem);
  }

  body .site-header .site-title a::before {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  body .site-header .site-description {
    margin-left: 46px;
    font-size: 0.58rem;
    line-height: 1.35;
    letter-spacing: 0.09em;
  }

  .rar-release-v5 .topline {
    font-size: 0.7rem;
    line-height: 1.35;
  }

  .rar-release-v5 .topline .wrap {
    width: min(100% - 20px, 460px);
  }
}

/* RAR footer visibility and mobile widget collision fix — 2026-10-01 */
body #site-footer,
body #site-footer .site-description,
body #site-footer .copyright,
body #site-footer a,
body #site-footer a:link,
body #site-footer a:visited {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

body #site-footer a:hover,
body #site-footer a:focus-visible {
  color: #f2d6c4 !important;
  -webkit-text-fill-color: #f2d6c4 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

body #site-footer a:focus-visible {
  outline: 3px solid #ffffff !important;
  outline-offset: 4px;
}

@media (max-width: 760px) {
  #wp-chatbot-chat-container {
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: max(96px, calc(84px + env(safe-area-inset-bottom))) !important;
  }

  #ea11y-root .ea11y-widget-open-button {
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: max(152px, calc(140px + env(safe-area-inset-bottom))) !important;
  }
}
