/* Shared accessibility and resilient-loading defaults for static pages. */
:root {
  --sh-gov-black: #0b0c0c;
  --sh-gov-teal: #0b7285;
  --sh-gov-teal-dark: #075766;
  --sh-gov-teal-pale: #e7f3f5;
  --sh-gov-teal-soft: #cfe8ec;
  --sh-gov-yellow: #ffdd00;
}

/* Light sitewide reading system. Static pages use a mix of Tailwind utilities
   and inline legacy styles, so these deliberate overrides keep all normal
   content on white with black text and border-led hierarchy. */
html,
body {
  background: #fff !important;
  color: #0b0c0c !important;
}

body .bg-slate-50,
body .bg-slate-100,
body .bg-gray-50,
body .bg-gray-100,
body .bg-cyan-50,
body .bg-teal-50,
body .bg-emerald-50,
body .bg-\[\#f8fafc\],
body .bg-\[\#F8FAFC\],
body .bg-\[\#0a1628\],
body .bg-\[\#0d1929\],
body .bg-\[\#0f1c32\],
body .bg-\[\#162035\],
body .bg-\[\#1e3a5f\],
body .bg-\[\#1E3A5F\] {
  background-color: #fff !important;
}

body .text-slate-300,
body .text-slate-400,
body .text-slate-500,
body .text-slate-600,
body .text-slate-700,
body .text-gray-400,
body .text-gray-500,
body .text-gray-600,
body .text-gray-700,
body .text-blue-300,
body .text-blue-400,
body .text-blue-500,
body .text-blue-700,
body .text-blue-800,
body .text-\[\#1e3a5f\],
body .text-\[\#1E3A5F\] {
  color: #0b0c0c !important;
}

body .bg-police,
body [style*="#0f1623"],
body [style*="#1a2744"],
body [style*="#0f172a"],
body [style*="#0f1c32"],
body [style*="#1e293b"],
body [style*="#1e3a5f"],
body [style*="#0b7285"] {
  background: #fff !important;
  color: #0b0c0c !important;
}

body .bg-police *,
body [style*="#0f1623"] *,
body [style*="#1a2744"] *,
body [style*="#0f172a"] *,
body [style*="#0f1c32"] *,
body [style*="#1e293b"] *,
body [style*="#1e3a5f"] *,
body [style*="#0b7285"] * {
  color: #0b0c0c !important;
}

body [style*="#475569"],
body [style*="#64748b"],
body [style*="#505a5f"] {
  color: #0b0c0c !important;
}

body main p,
body article p {
  color: #0b0c0c !important;
}

main h1,
main h2,
main h3,
main h4,
article h1,
article h2,
article h3,
article h4 {
  color: #0b0c0c !important;
}

/* Replace blue/navy surfaces carrying dark text with the homepage teal and
   white content. The helplines page keeps its intentionally dark
   emergency-information treatment. */
body:not(.helplines-page) :is(
  .bg-blue-50,
  .bg-blue-100,
  .bg-blue-200,
  .bg-navy-50,
  .bg-navy-100,
  .bg-navy-200,
  [style*="background:#eff6ff"],
  [style*="background: #eff6ff"],
  [style*="background-color:#eff6ff"],
  [style*="background-color: #eff6ff"],
  [style*="background:#dbeafe"],
  [style*="background: #dbeafe"],
  [style*="background-color:#dbeafe"],
  [style*="background-color: #dbeafe"],
  [style*="background:#f0f9ff"],
  [style*="background: #f0f9ff"],
  [style*="background-color:#f0f9ff"],
  [style*="background-color: #f0f9ff"]
) {
  background: var(--sh-gov-teal) !important;
  color: #fff !important;
}

body:not(.helplines-page) :is(
  .bg-blue-50,
  .bg-blue-100,
  .bg-blue-200,
  .bg-navy-50,
  .bg-navy-100,
  .bg-navy-200,
  [style*="background:#eff6ff"],
  [style*="background: #eff6ff"],
  [style*="background-color:#eff6ff"],
  [style*="background-color: #eff6ff"],
  [style*="background:#dbeafe"],
  [style*="background: #dbeafe"],
  [style*="background-color:#dbeafe"],
  [style*="background-color: #dbeafe"],
  [style*="background:#f0f9ff"],
  [style*="background: #f0f9ff"],
  [style*="background-color:#f0f9ff"],
  [style*="background-color: #f0f9ff"]
) * {
  color: #fff !important;
}

body:not(.helplines-page) :is(
  .hover\:bg-blue-50:hover,
  .hover\:bg-blue-100:hover,
  .hover\:bg-blue-200:hover,
  .hover\:bg-navy-50:hover,
  .hover\:bg-navy-100:hover,
  .hover\:bg-navy-200:hover
) {
  background: var(--sh-gov-teal) !important;
  color: #fff !important;
}

body:not(.helplines-page) :is(
  .hover\:bg-blue-50:hover,
  .hover\:bg-blue-100:hover,
  .hover\:bg-blue-200:hover,
  .hover\:bg-navy-50:hover,
  .hover\:bg-navy-100:hover,
  .hover\:bg-navy-200:hover
) * {
  color: #fff !important;
}

body:not(.helplines-page) .sh-pale-teal-panel {
  background: var(--sh-gov-teal-pale) !important;
  border-left-color: var(--sh-gov-teal) !important;
  color: var(--sh-gov-teal-dark) !important;
}

body:not(.helplines-page) .sh-pale-teal-panel :is(p, a) {
  color: var(--sh-gov-teal-dark) !important;
}

body:not(.helplines-page) :is(
  .bg-blue-500,
  .bg-blue-600,
  .bg-blue-700,
  .bg-blue-800,
  .bg-blue-900,
  .bg-navy-700,
  .bg-navy-800,
  .bg-navy-900,
  .bg-police,
  .coe-ring,
  [class~="bg-[#1e3a5f]"],
  [class~="bg-[#1E3A5F]"],
  [class~="bg-[#0f1c32]"],
  [class~="from-navy-900"],
  [class~="via-[#1e3a5f]"],
  [class~="via-[#0f1c32]"],
  [style*="background:#1e3a5f"],
  [style*="background: #1e3a5f"],
  [style*="background-color:#1e3a5f"],
  [style*="background-color: #1e3a5f"],
  [style*="background:#0f1c32"],
  [style*="background: #0f1c32"],
  [style*="linear-gradient"][style*="#1e3a5f"],
  [style*="linear-gradient"][style*="#0f1c32"]
) {
  background: var(--sh-gov-teal) !important;
  background-image: none !important;
  border-color: var(--sh-gov-teal-dark) !important;
  color: #fff !important;
}

body:not(.helplines-page) :is(
  .bg-blue-500,
  .bg-blue-600,
  .bg-blue-700,
  .bg-blue-800,
  .bg-blue-900,
  .bg-navy-700,
  .bg-navy-800,
  .bg-navy-900,
  .bg-police,
  .coe-ring,
  [class~="bg-[#1e3a5f]"],
  [class~="bg-[#1E3A5F]"],
  [class~="bg-[#0f1c32]"],
  [class~="from-navy-900"],
  [class~="via-[#1e3a5f]"],
  [class~="via-[#0f1c32]"],
  [style*="background:#1e3a5f"],
  [style*="background: #1e3a5f"],
  [style*="background-color:#1e3a5f"],
  [style*="background-color: #1e3a5f"],
  [style*="background:#0f1c32"],
  [style*="background: #0f1c32"],
  [style*="linear-gradient"][style*="#1e3a5f"],
  [style*="linear-gradient"][style*="#0f1c32"]
) :is(h1, h2, h3, h4, p, .text-slate-300, .text-slate-400, .text-slate-500, .text-blue-300, .text-blue-400, .text-blue-500, .text-blue-700, .text-blue-800) {
  color: #fff !important;
}

body:not(.helplines-page) :is(.text-blue-300, .text-blue-400, .text-blue-500, .text-blue-600, .text-blue-700, .text-blue-800, .text-blue-900) {
  color: var(--sh-gov-teal-dark) !important;
}

/* Keep the surface foreground white after the general text-colour utilities
   above have been resolved by the cascade. */
body:not(.helplines-page) :is(
  .bg-blue-50,
  .bg-blue-100,
  .bg-blue-200,
  .bg-navy-50,
  .bg-navy-100,
  .bg-navy-200,
  [style*="background:#eff6ff"],
  [style*="background: #eff6ff"],
  [style*="background-color:#eff6ff"],
  [style*="background-color: #eff6ff"],
  [style*="background:#dbeafe"],
  [style*="background: #dbeafe"],
  [style*="background-color:#dbeafe"],
  [style*="background-color: #dbeafe"],
  [style*="background:#f0f9ff"],
  [style*="background: #f0f9ff"],
  [style*="background-color:#f0f9ff"],
  [style*="background-color: #f0f9ff"]
),
body:not(.helplines-page) :is(
  .bg-blue-50,
  .bg-blue-100,
  .bg-blue-200,
  .bg-navy-50,
  .bg-navy-100,
  .bg-navy-200,
  [style*="background:#eff6ff"],
  [style*="background: #eff6ff"],
  [style*="background-color:#eff6ff"],
  [style*="background-color: #eff6ff"],
  [style*="background:#dbeafe"],
  [style*="background: #dbeafe"],
  [style*="background-color:#dbeafe"],
  [style*="background-color: #dbeafe"],
  [style*="background:#f0f9ff"],
  [style*="background: #f0f9ff"],
  [style*="background-color:#f0f9ff"],
  [style*="background-color: #f0f9ff"]
) * {
  color: #fff !important;
}

body:not(.helplines-page) :is(.border-blue-100, .border-blue-200, .border-blue-300, .border-blue-400, .border-blue-500, .border-blue-600, .border-blue-700, .border-blue-800, .border-blue-900) {
  border-color: #8fc8d1 !important;
}

body:not(.helplines-page) :is(.hover\:bg-blue-700:hover, .hover\:bg-blue-800:hover, .hover\:bg-blue-900:hover, .hover\:bg-navy-700:hover, .hover\:bg-navy-800:hover, .hover\:bg-navy-900:hover) {
  background: var(--sh-gov-teal-dark) !important;
}

body [class*="shadow"] {
  box-shadow: none !important;
}

.site-skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100000;
  transform: translateY(-160%);
  padding: 0.75rem 1rem;
  border-radius: 0;
  background: #ffffff;
  color: #0b0c0c;
  font: 700 0.9375rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 2px 12px rgb(0 0 0 / 35%);
  text-decoration: none;
}

.site-skip-link:focus {
  transform: translateY(0);
  outline: 3px solid #ffdd00;
  outline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--sh-gov-yellow);
  outline-offset: 3px;
}

button,
input,
select,
textarea,
[class*="rounded"],
[style*="border-radius"] {
  border-radius: 0 !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

img,
svg,
video {
  max-width: 100%;
}

img,
video {
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}