/* NF Accessibility — Phase 2 (Nov 17, 2026). Owned by the nf-accessibility mu-plugin.
   Sections: 1 toolbar · 2 typography guarantees · 3 text-size levels ·
   4 high contrast · 5 dark mode · 6 reader mode · 7 focus visibility. */

/* ---------- 1. Toolbar ---------- */
.nf-a11y-bar {
  background: #00305a;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 16px;
  font-size: 15px;
  line-height: 1.4;
  position: relative;
  z-index: 999;
}
.nf-a11y-label { font-weight: 700; }
.nf-a11y-group { display: inline-flex; align-items: center; gap: 6px; }
.nf-a11y-group-label { margin-right: 2px; }
.nf-a11y-btn {
  background: #ffffff;
  color: #00305a;
  border: 2px solid #ffffff;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  min-height: 40px;
  min-width: 44px;
  padding: 6px 12px;
  cursor: pointer;
}
.nf-a11y-btn:hover { background: #e8eef4; }
.nf-a11y-btn[aria-pressed="true"] { background: #f5b200; border-color: #f5b200; color: #001b36; }

/* ---------- 2. Typography guarantees (always on) ----------
   Live theme measured Nov 17, 2026: body 16px / line-height 30px (1.875),
   primary text #212529 on white = 15.4:1. These rules pin the floor so a
   future theme change cannot silently regress below the standard. */
body { font-size: 16px; }
.page-content-single { color: #212529; text-align: left; }
.page-content-single p,
.page-content-single li { line-height: 1.65; text-align: left; }

/* ---------- 3. Text-size levels (A- = 100%, A = 112.5%, A+ = 125%) ---------- */
html.nf-ts112 body { font-size: 18px; }
html.nf-ts125 body { font-size: 20px; }
html.nf-ts112 .page-content-single p,
html.nf-ts112 .page-content-single li,
html.nf-ts112 .mg-blog-post p { font-size: 1.125rem; }
html.nf-ts125 .page-content-single p,
html.nf-ts125 .page-content-single li,
html.nf-ts125 .mg-blog-post p { font-size: 1.25rem; }

/* ---------- 4. High contrast ---------- */
html.nf-contrast body { background: #ffffff !important; color: #000000 !important; }
html.nf-contrast .page-content-single,
html.nf-contrast .mg-blog-post,
html.nf-contrast .card,
html.nf-contrast .widget,
html.nf-contrast main,
html.nf-contrast article { background: #ffffff !important; color: #000000 !important; }
html.nf-contrast h1, html.nf-contrast h2, html.nf-contrast h3,
html.nf-contrast h4, html.nf-contrast h5, html.nf-contrast h6 { color: #000000 !important; }
html.nf-contrast a { color: #0033cc !important; text-decoration: underline !important; }
html.nf-contrast .nf-a11y-bar { background: #000000; }
html.nf-contrast .nf-a11y-btn { border-color: #ffffff; }

/* ---------- 5. Dark mode ---------- */
html.nf-dark body { background: #121212 !important; color: #f2f2f2 !important; }
html.nf-dark .page-content-single,
html.nf-dark .mg-blog-post,
html.nf-dark .card,
html.nf-dark .widget,
html.nf-dark article { background: #1d1d1d !important; color: #f2f2f2 !important; }
html.nf-dark h1, html.nf-dark h2, html.nf-dark h3,
html.nf-dark h4, html.nf-dark h5, html.nf-dark h6 { color: #ffffff !important; }
html.nf-dark a { color: #9ecbff !important; }
html.nf-dark input, html.nf-dark select, html.nf-dark textarea {
  background: #1d1d1d; color: #f2f2f2; border-color: #8a8a8a;
}

/* ---------- 6. Reader mode (single articles: one readable column) ---------- */
html.nf-reader.single .sidebar-sticky,
html.nf-reader.single .mg-sidebar,
html.nf-reader.single aside { display: none !important; }
html.nf-reader.single main#content .col-lg-9,
html.nf-reader.single main#content .col-md-8 {
  flex: 0 0 100%;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  float: none;
}

/* ---------- 7. Visible focus ---------- */
.nf-a11y-btn:focus-visible { outline: 3px solid #f5b200; outline-offset: 2px; }
:focus-visible { outline: 3px solid #00305a; outline-offset: 1px; }
html.nf-dark :focus-visible, html.nf-contrast :focus-visible { outline-color: #f5b200; }
