/*
 * Accessibility overrides (WCAG 2.1 AA).
 * Load this AFTER bootstrap*.css, onepage_notables.css and style.css.
 */

/* ---- 1.4.4 Resize text: honor the user's browser font-size setting ---- */
html {
    font-size: 62.5%;            /* 10px at default settings, scales with user prefs */
    scroll-padding-top: 7rem;    /* keep anchor targets out from under the fixed navbar */
}

/* ---- 1.4.12 Text spacing / readability ---- */
body {
    font-size: 1.6rem;
    font-weight: 400;            /* style.css uses 300, too thin for small text */
    line-height: 1.5;
    color: #333;
}

p, li, td, th, dd {
    line-height: 1.5;
}

.lead {
    font-size: 1.6rem;
}

@media (min-width: 768px) {
    .lead {
        font-size: 2.1rem;
    }
}

.featurette-heading {
    font-size: 3rem;
}

.navbar-brand {
    font-size: 3.6rem;
}

@media (max-width: 1200px) {
    .featurette-heading { font-size: 2.4rem; }
    .navbar-brand { font-size: 3rem; }
}

@media (max-width: 668px) {
    .featurette-heading { font-size: 1.8rem; }
    .navbar-brand { font-size: 2.4rem; }
}

/* ---- 1.4.10 Reflow: no horizontal scrolling at 320px wide ---- */
img, video, iframe, table {
    max-width: 100%;
}

img, video {
    height: auto;
}

pre, code {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

td, th {
    overflow-wrap: break-word;
}

td a, th a {
    overflow-wrap: anywhere;
}

/* Override fixed inline table sizes (e.g. width: 838px) on small screens */
@media (max-width: 860px) {
    table[style*="width"] {
        width: 100% !important;
        height: auto !important;
    }
}

/* Stacked "no-more-tables" layout: stop labels overlapping cell content */
@media only screen and (max-width: 800px) {
    #no-more-tables td {
        padding-left: 6px;
    }

    #no-more-tables td:before {
        position: static;
        display: block;
        width: auto;
        padding-right: 0;
        white-space: normal;
    }

    #no-more-tables td[data-title=""]:before {
        display: none;
    }
}

/* ---- 1.4.3 Contrast (minimum 4.5:1 for text) ---- */

/* Bootstrap's #9d9d9d on #6A7F10 is 1.66:1; white is 4.51:1. */
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
    color: #fff;
}

.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus,
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
    color: #fff;
    text-decoration: underline;
}

.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
    color: #fff;
    background-color: #3f4c09;
}

/* 1.4.11 Non-text contrast (3:1) for the mobile menu button */
.navbar-inverse .navbar-toggle {
    border-color: #fff;
}

.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
    background-color: #3f4c09;
}

.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
    border-color: #fff;
}

/* Bootstrap #777 is 4.48:1, just under AA */
.text-muted,
.help-block,
.breadcrumb > .active,
.dropdown-header,
.table caption {
    color: #595959;
}

/* style.css greys (#a2a2a2, #999, #888, #7F8289) fail on white */
blockquote,
blockquote cite,
.post-meta,
.post-meta span,
.widget ul li,
.widget .recent li,
.recent-post .text,
.post-image .post-heading small,
.box-gray p,
.inner-heading small {
    color: #595959;
}

/* ---- 1.4.1 Use of color: links in content must not rely on color alone ---- */
a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

a:hover,
a:focus {
    text-decoration-thickness: 2px;
}

.navbar a,
.btn,
.skip-link {
    text-decoration: none;
}

/* ---- 2.4.7 Focus visible ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #1a1a1a;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #fff;
}

/* Light ring on the dark navbar */
.navbar-inverse a:focus-visible,
.navbar-inverse button:focus-visible {
    outline-color: #fff;
    box-shadow: 0 0 0 5px #1a1a1a;
}

/* style.css removes the outline on active links */
a:active {
    outline: revert;
}

/* ---- 2.4.1 Bypass blocks: skip link, hidden until focused ---- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 2000;
    padding: 1rem 1.5rem;
    background: #fff;
    color: #000;
    font-weight: bold;
}

.skip-link:focus,
.skip-link.sr-only-focusable:focus {
    top: 0;
    position: absolute;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    overflow: visible;
}

/* ---- 2.3.3 / user preference: reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

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

/* ---- 1.4.11 / Windows High Contrast & forced-colors mode ---- */
@media (forced-colors: active) {
    a:focus-visible,
    button:focus-visible {
        outline: 3px solid CanvasText;
    }

    .navbar-toggle .icon-bar {
        background-color: CanvasText;
    }
}
