/* Heritage Ecosystem — accessibility overrides (loaded after global.css, header.css and footer.css).
   Colours are chosen for a contrast ratio of at least 7:1 on white (WCAG AAA), or on the button colour for white text. */
:root { --accent: #17653a; }                       /* was #27ae60: white text on it was only 2.9:1 */
a { color: #1a5276; }                              /* was #2980b9: 4.3:1 on white; this is 8.4:1 */
.btn-primary { background: #17653a; border-color: #17653a; color: #fff; }   /* 7.1:1 */
.welcome-overlay .welcome-content a { color: #1a5276; text-decoration: underline; }

/* Links inside running text are underlined, so they do not rely on colour alone */
main p a:not(.btn):not(.sp-btn), main li a:not(.btn):not(.sp-btn) { text-decoration: underline; }

/* Visible keyboard focus everywhere (the header and footer keep their own white outlines) */
:focus-visible { outline: 3px solid #1a5276; outline-offset: 2px; }

/* "Skip to main content", shown when it receives keyboard focus */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10000; background: #fff; color: #000; padding: .6rem 1rem; border: 2px solid #1a5276; border-radius: 4px; }
.skip-link:focus { left: .5rem; top: .5rem; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Reflow (WCAG 1.4.10): a sticky header must not fill the screen on a phone, a landscape phone or at 400% zoom */
@media (max-width: 640px), (max-height: 500px) { .site-header { position: static; } }

/* Focus not hidden (WCAG 2.4.11): links jumped to and fields that take focus stop below the sticky header,
   not underneath it (common/js/src/a11y.js does the same for focus that the browser does not scroll) */
html { scroll-padding-top: 5rem; }
@media (max-width: 640px), (max-height: 500px) { html { scroll-padding-top: 0; } }

/* A button that looks like a link: used where a "link" really opens a panel or does something on the page
   (screen readers then announce it as a button). Takes the colour and size of the links around it. */
.link-button { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.footer-links .link-button { display: inline-block; padding: 0.5rem 0; color: #ecf0f1; text-decoration: none; }   /* same as the footer links beside it */
.footer-links .link-button:hover, .footer-links .link-button:focus-visible { color: #ffffff; text-decoration: underline; }
.footer-links .link-button:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Footer links: spaced, no "|" separators, so wrapping is clean and tap areas are larger */
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-links a { display: inline-block; padding: 0.5rem 0; }

/* Map credit line (Leaflet / OpenStreetMap) on every map: solid white behind it and darker text, 7:1 (was 80% white, #333 and #0078a8 links) */
.leaflet-container .leaflet-control-attribution { background: #fff; color: #222; }
.leaflet-container .leaflet-control-attribution a { color: #1a5276; }
