/* ============================================================
   MaxPro Asia — Accessibility Panel & Sticky Header
   Matches existing brand: #0ada2d / #003e7f / #1f1f1f
   WCAG 2.2 AA | Bootstrap 5 compatible
   ============================================================ */

/* ── CSS Variables (brand colours from existing CSS) ─────── */
:root {
  --acc-brand:        #003e7f;   /* footer-bottom blue            */
  --acc-brand-hover:  #002d5c;
  --acc-green:        #0ada2d;   /* top-bar / nav hover green     */
  --acc-panel-width:  340px;
}

/* ══════════════════════════════════════════════════════════
   STICKY HEADER
   ══════════════════════════════════════════════════════════ */
#site-header {
  position: static;
}

#site-header .top-bar {
  position: static;
}

/* Only the white navbar is sticky — the green top-bar scrolls away normally */
#site-navbar {
  position: sticky;
  top: 0;
  z-index: 1040;
  background: #fff;
  transition: box-shadow 0.25s ease;
}

#site-navbar.header-scrolled {
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.13);
}

/* Prevent content being hidden behind the sticky navbar on anchor jumps */
html {
  scroll-padding-top: var(--header-height, 70px);
}

/* ══════════════════════════════════════════════════════════
   ACCESSIBILITY BUTTON  (inside navbar)
   ══════════════════════════════════════════════════════════ */
.btn-accessibility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1.5px solid var(--acc-brand);
  border-radius: 50%;
  padding: 0;
  color: var(--acc-brand);
  cursor: pointer;
  line-height: 1;
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
}

.btn-accessibility:hover {
  background: var(--acc-brand);
  color: #fff;
}

.btn-accessibility:focus-visible {
  outline: 3px solid var(--acc-green);
  outline-offset: 2px;
}

.btn-accessibility i {
  font-size: 1.05rem;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════
   OVERLAY
   ══════════════════════════════════════════════════════════ */
#acc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#acc-overlay.acc-open {
  display: block;
  animation: overlayFadeIn 0.22s ease forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════
   ACCESSIBILITY PANEL (slide-in from right)
   ══════════════════════════════════════════════════════════ */
#acc-panel {
  position: fixed;
  top: 0;
  right: calc(var(--acc-panel-width) * -1 - 20px);
  width: var(--acc-panel-width);
  max-width: 96vw;
  height: 100dvh;
  background: #fff;
  z-index: 1055;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: -4px 0 28px rgba(0, 0, 0, 0.18);
  border-left: 4px solid var(--acc-green);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#acc-panel.acc-open {
  right: 0;
}

/* ── Panel Header ──────────────────────────────────────── */
.acc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  background: var(--acc-brand);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
  flex-shrink: 0;
}

.acc-panel-head h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.acc-panel-head h2 i { font-size: 1.1rem; }

.acc-close {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 6px;
  color: #fff;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background 0.15s;
}

.acc-close:hover { background: rgba(255,255,255,0.2); }
.acc-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ── Panel Body ─────────────────────────────────────────── */
.acc-panel-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Section Label ──────────────────────────────────────── */
.acc-section {
  margin-bottom: 16px;
}

.acc-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #6b7280;
  margin: 0 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e5e7eb;
}

/* ── Font Size Controls ─────────────────────────────────── */
.acc-font-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 8px 10px;
}

.acc-font-btn {
  background: #fff;
  border: 1.5px solid #ced4da;
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: #333;
  flex-shrink: 0;
  transition: all 0.15s;
}

.acc-font-btn:hover,
.acc-font-btn:focus-visible {
  background: var(--acc-brand);
  color: #fff;
  border-color: var(--acc-brand);
}

.acc-font-btn:focus-visible { outline: 3px solid var(--acc-green); outline-offset: 2px; }
.acc-font-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.acc-font-label {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
}

/* ── Skip To Content select ─────────────────────────────── */
.acc-skip-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.acc-skip-select {
  width: 100%;
  padding: 9px 10px;
  background: #f8f9fa;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.acc-skip-select:hover {
  border-color: var(--acc-brand);
}

.acc-skip-select:focus-visible {
  outline: 3px solid var(--acc-green);
  outline-offset: 2px;
  border-color: var(--acc-brand);
}

/* ── Read Page button ───────────────────────────────────── */
.acc-read-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f8f9fa;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  padding: 10px;
  color: #374151;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.18s;
}

.acc-read-btn:hover {
  border-color: var(--acc-brand);
  background: #e8f0fe;
  color: var(--acc-brand);
}

.acc-read-btn:focus-visible {
  outline: 3px solid var(--acc-green);
  outline-offset: 2px;
}

.acc-read-btn.active {
  background: var(--acc-brand);
  border-color: var(--acc-brand);
  color: #fff;
}

.acc-read-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Toggle Grid ────────────────────────────────────────── */
.acc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

/* ── Toggle Button ──────────────────────────────────────── */
.acc-toggle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f8f9fa;
  border: 1.5px solid #dee2e6;
  border-radius: 10px;
  padding: 11px 6px;
  cursor: pointer;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.2;
  min-height: 70px;
  transition: all 0.18s;
}

.acc-toggle i {
  font-size: 1.2rem;
  line-height: 1;
  pointer-events: none;
}

.acc-toggle:hover {
  border-color: var(--acc-brand);
  background: #e8f0fe;
  color: var(--acc-brand);
}

.acc-toggle:focus-visible {
  outline: 3px solid var(--acc-green);
  outline-offset: 2px;
}

.acc-toggle.active {
  background: var(--acc-brand);
  border-color: var(--acc-brand);
  color: #fff;
}

.acc-toggle.active::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.62rem;
  font-weight: 900;
}

/* ── Reset Button ───────────────────────────────────────── */
.acc-reset {
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  background: #fff3f3;
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s;
}

.acc-reset:hover { background: #fee2e2; border-color: #f87171; }
.acc-reset:focus-visible { outline: 3px solid var(--acc-green); outline-offset: 2px; }

/* ── Panel Footer ───────────────────────────────────────── */
.acc-panel-foot {
  padding: 10px 16px;
  background: #f8f9fa;
  border-top: 1px solid #e5e7eb;
  font-size: 0.68rem;
  color: #9ca3af;
  text-align: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   FEATURE STYLES  (applied to <html> tag)
   ══════════════════════════════════════════════════════════ */

/* Font Size */
html[data-font-size="80"]  { font-size: 12.8px !important; }
html[data-font-size="90"]  { font-size: 14.4px !important; }
html[data-font-size="100"] { font-size: 16px   !important; }
html[data-font-size="110"] { font-size: 17.6px !important; }
html[data-font-size="120"] { font-size: 19.2px !important; }
html[data-font-size="130"] { font-size: 20.8px !important; }
html[data-font-size="140"] { font-size: 22.4px !important; }
html[data-font-size="150"] { font-size: 24px   !important; }

/* Smart Contrast — full dark accessibility theme.
   Scoped to #site-header, #main-content, #site-footer only — the
   accessibility panel itself (#acc-panel) is never targeted so it
   keeps its own fixed white design regardless of this toggle.
   Never touches <img>, <svg>, <video>, <canvas>, icon glyphs, logos,
   or the site's colourful brand CTA buttons. No filter: invert /
   hue-rotate / contrast / brightness anywhere — explicit colors only. */
html.acc-smart-contrast {
  --sc-bg:          #10151b;
  --sc-bg-alt:      #161d25;
  --sc-surface:     #1b232c;
  --sc-surface-alt: #212b36;
  --sc-border:      #31404f;
  --sc-text:        #eef2f6;
  --sc-text-muted:  #a7b4c2;
  --sc-accent:      #4da3ff;
  --sc-accent-hover:#7cbcff;
}

html.acc-smart-contrast body {
  background-color: var(--sc-bg) !important;
}

html.acc-smart-contrast :is(#site-header, #main-content, #site-footer) {
  background-color: var(--sc-bg) !important;
  color: var(--sc-text) !important;
}

html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  :is(.bg-white, .bg-light, .card, .main-box, .main-container, .main-content,
      .content-section, .content-wrapper, .table-section, .sidebar,
      .sidebar-widget, .sidebar-section, .download-box, .benefit-card,
      .news-card, .highlight-box, .rdd-card, .testimonial-card, .card-back,
      .tags-section, .article-content, .contact-section1, .dropdown-menu,
      .modal-content, .accordion-item, .accordion-body, .list-group-item,
      .form-container, .team-row, .card-front) {
  background-color: var(--sc-surface) !important;
  color: var(--sc-text) !important;
  border-color: var(--sc-border) !important;
}

html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  :is([style*="background-color: blue"], [style*="background-color:#fff"],
      [style*="background-color: #fff"], [style*="background-color: white"],
      [style*="background-color: rgba(233, 236, 239"],
      [style*="background-color: rgba(255, 255, 255"]) {
  background-color: var(--sc-surface) !important;
  color: var(--sc-text) !important;
}

html.acc-smart-contrast #site-navbar {
  background-color: var(--sc-bg-alt) !important;
  border-color: var(--sc-border) !important;
}
html.acc-smart-contrast #site-navbar .navbar-nav .nav-link {
  color: var(--sc-text) !important;
}
html.acc-smart-contrast .search-input,
html.acc-smart-contrast .search-container {
  background-color: var(--sc-surface-alt) !important;
  color: var(--sc-text) !important;
}

html.acc-smart-contrast #site-footer,
html.acc-smart-contrast .footer-bottom {
  background-color: var(--sc-bg-alt) !important;
}

html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  :is(p, li, span, td, th, label, h1, h2, h3, h4, h5, h6) {
  color: var(--sc-text) !important;
}
html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  :is(.text-muted, .text-secondary, small, .small) {
  color: var(--sc-text-muted) !important;
}

html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  a:not(.btn):not(.nav-link):not(.navbar-brand) {
  color: var(--sc-accent) !important;
}
html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
  color: var(--sc-accent-hover) !important;
}

html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  :is(.form-control, .form-select, input, select, textarea) {
  background-color: var(--sc-surface-alt) !important;
  color: var(--sc-text) !important;
  border-color: var(--sc-border) !important;
}
html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  .form-control::placeholder {
  color: var(--sc-text-muted) !important;
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════
   TABLE — SMART CONTRAST  (global, every page)
   ══════════════════════════════════════════════════════════
   Root causes that make simple selectors fail:
   1. pricing.css loads AFTER this file and sets
      `.table-bordered > thead > tr > th { background:#e6ffe6; color:#0b4e0b }`
      plus a CSS gradient clip on h2/headings that bleeds into text colour.
   2. Bootstrap 5 uses CSS custom properties (--bs-table-bg etc.) for
      striped / hover rows; a plain background-color !important does not
      reset those variables, so Bootstrap recalculates and re-applies
      the light colour over our dark one.
   3. .table-dark, .table-light, .bg-success-subtle and similar
      utility classes have high specificity and inline !important rules
      in the compiled Bootstrap bundle.
   Fix strategy:
   - Override every selector variant individually with !important.
   - Also reset the Bootstrap 5 CSS variables (--bs-table-*) on every
     cell so the cascade can never sneak a light colour back in.
   - Fix pricing.css's gradient-clip text trick with
     -webkit-text-fill-color + background-image:none on thead cells.
   ══════════════════════════════════════════════════════════ */

/* Table container */
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) {
  background-color: var(--sc-surface) !important;
  color: var(--sc-text) !important;
  border-color: var(--sc-border) !important;
}

html.acc-smart-contrast :is(#main-content, #site-footer)
  .table-responsive {
  background-color: transparent !important;
}

/* ── thead – ALL Bootstrap variants + page-level overrides ── */
html.acc-smart-contrast :is(#main-content, #site-footer) thead,
html.acc-smart-contrast :is(#main-content, #site-footer) thead tr,
html.acc-smart-contrast :is(#main-content, #site-footer) thead tr th,
html.acc-smart-contrast :is(#main-content, #site-footer) thead tr td,
html.acc-smart-contrast :is(#main-content, #site-footer) .table thead,
html.acc-smart-contrast :is(#main-content, #site-footer) .table thead tr,
html.acc-smart-contrast :is(#main-content, #site-footer) .table thead th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table thead td,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-dark thead,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-dark thead tr,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-dark thead th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-dark thead td,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-light thead,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-light thead th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-striped thead th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-hover thead th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-bordered thead th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-bordered thead td {
  background-color: #1c2a38 !important;
  background-image: none !important;          /* neutralises gradient from pricing.css */
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important; /* neutralises -webkit-background-clip:text */
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  border-color: var(--sc-border) !important;
  /* Reset Bootstrap 5 CSS vars that survive specificity wars */
  --bs-table-bg: #1c2a38 !important;
  --bs-table-color: #ffffff !important;
  --bs-table-border-color: var(--sc-border) !important;
}

/* Explicit long-form fix for pricing.css's child-combinator selector
   (.table-bordered > thead > tr > th) which beats descendant selectors */
html.acc-smart-contrast #main-content
  .table-bordered > thead > tr > th,
html.acc-smart-contrast #main-content
  .table-bordered > thead > tr > td {
  background-color: #1c2a38 !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  border-color: var(--sc-border) !important;
}

/* ── tbody – ALL Bootstrap variants ─────────────────────── */
html.acc-smart-contrast :is(#main-content, #site-footer) tbody,
html.acc-smart-contrast :is(#main-content, #site-footer) tbody tr,
html.acc-smart-contrast :is(#main-content, #site-footer) tbody tr th,
html.acc-smart-contrast :is(#main-content, #site-footer) tbody tr td,
html.acc-smart-contrast :is(#main-content, #site-footer) .table tbody,
html.acc-smart-contrast :is(#main-content, #site-footer) .table tbody tr,
html.acc-smart-contrast :is(#main-content, #site-footer) .table tbody th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table tbody td,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-dark tbody th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-dark tbody td,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-bordered tbody th,
html.acc-smart-contrast :is(#main-content, #site-footer) .table-bordered tbody td {
  background-color: var(--sc-surface) !important;
  color: var(--sc-text) !important;
  border-color: var(--sc-border) !important;
  /* Reset Bootstrap 5 CSS variables so striped/hover can't override */
  --bs-table-bg: #1b232c !important;
  --bs-table-striped-bg: #212b36 !important;
  --bs-table-hover-bg: #263240 !important;
  --bs-table-active-bg: #263240 !important;
  --bs-table-color: #eef2f6 !important;
  --bs-table-striped-color: #eef2f6 !important;
  --bs-table-hover-color: #eef2f6 !important;
  --bs-table-border-color: var(--sc-border) !important;
}

/* Striped rows — Bootstrap applies colour via the CSS var, but some
   older builds still use a background-color shorthand; cover both. */
html.acc-smart-contrast :is(#main-content, #site-footer)
  .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #212b36 !important;
  color: var(--sc-text) !important;
}
html.acc-smart-contrast :is(#main-content, #site-footer)
  .table-striped > tbody > tr:nth-of-type(even) > * {
  background-color: var(--sc-surface) !important;
  color: var(--sc-text) !important;
}

/* Hover rows */
html.acc-smart-contrast :is(#main-content, #site-footer)
  .table-hover > tbody > tr:hover > * {
  background-color: #263240 !important;
  color: #ffffff !important;
  border-color: var(--sc-border) !important;
}

/* ── tfoot ───────────────────────────────────────────────── */
html.acc-smart-contrast :is(#main-content, #site-footer) tfoot,
html.acc-smart-contrast :is(#main-content, #site-footer) tfoot tr,
html.acc-smart-contrast :is(#main-content, #site-footer) tfoot th,
html.acc-smart-contrast :is(#main-content, #site-footer) tfoot td {
  background-color: #1c2a38 !important;
  color: var(--sc-text) !important;
  border-color: var(--sc-border) !important;
}

/* ── Row-header cells in tbody (th[scope="row"]) ─────────── */
html.acc-smart-contrast :is(#main-content, #site-footer)
  tbody th[scope="row"] {
  background-color: var(--sc-surface-alt) !important;
  color: var(--sc-text) !important;
  border-color: var(--sc-border) !important;
}

/* ── Links inside tables ─────────────────────────────────── */
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) a {
  color: var(--sc-accent) !important;
}
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) a:hover {
  color: var(--sc-accent-hover) !important;
  text-decoration: underline !important;
}

/* ── Accordion tables (important_updates.php) ────────────── */
html.acc-smart-contrast #main-content
  .accordion-body thead th,
html.acc-smart-contrast #main-content
  .accordion-body thead td {
  background-color: #1c2a38 !important;
  color: #ffffff !important;
  border-color: var(--sc-border) !important;
}
html.acc-smart-contrast #main-content
  .accordion-body tbody td,
html.acc-smart-contrast #main-content
  .accordion-body tbody th {
  background-color: var(--sc-surface) !important;
  color: var(--sc-text) !important;
  border-color: var(--sc-border) !important;
}

/* ── Bootstrap success/primary/danger utility backgrounds
       on table rows (.table-success, .bg-success-subtle etc.) ── */
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) tr.table-success,
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) tr.table-success > td,
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) tr.table-success > th,
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) .bg-success-subtle,
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) .bg-primary-subtle,
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) .bg-danger-subtle,
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) .bg-warning-subtle {
  background-color: var(--sc-surface-alt) !important;
  color: var(--sc-text) !important;
}

/* ── Badges inside tables (view_updates.php etc.) ─────────── */
html.acc-smart-contrast :is(#main-content, #site-footer)
  :is(table, .table) .badge {
  background-color: var(--sc-surface-alt) !important;
  color: var(--sc-text) !important;
  border: 1px solid var(--sc-border) !important;
}

html.acc-smart-contrast :is(#site-header, #main-content, #site-footer)
  :is(.border, .border-bottom, .shadow, .shadow-sm, .shadow-lg) {
  border-color: var(--sc-border) !important;
}

/* ── pricing.php Smart Contrast fixes ───────────────────────
   1. .main-heading uses -webkit-background-clip:text gradient —
      reset it to a readable solid colour.
   2. .pricing-text / .symbol / .label use green colours that
      vanish on dark backgrounds — change to light text.
   3. .bg-success-subtle cards become dark surfaces.
   4. .table-section white card becomes dark surface.
   5. .text-success-emphasis heading inside cards → light text.
   ──────────────────────────────────────────────────────────── */
html.acc-smart-contrast #main-content .main-heading {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--sc-text) !important;
  color: var(--sc-text) !important;
}

html.acc-smart-contrast #main-content .pricing-text,
html.acc-smart-contrast #main-content .pricing-text .symbol,
html.acc-smart-contrast #main-content .pricing-text .label {
  color: var(--sc-text) !important;
  -webkit-text-fill-color: var(--sc-text) !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

html.acc-smart-contrast #main-content .bg-success-subtle {
  background-color: var(--sc-surface) !important;
  border: 1px solid var(--sc-border) !important;
}

html.acc-smart-contrast #main-content .bg-success-subtle h3,
html.acc-smart-contrast #main-content .bg-success-subtle .text-success-emphasis {
  color: var(--sc-text) !important;
  -webkit-text-fill-color: var(--sc-text) !important;
}

html.acc-smart-contrast #main-content .bg-success-subtle li {
  color: var(--sc-text-muted) !important;
}

html.acc-smart-contrast #main-content .table-section {
  background-color: var(--sc-surface) !important;
  box-shadow: none !important;
  border: 1px solid var(--sc-border) !important;
}

html.acc-smart-contrast #main-content .table-section h2.text-success {
  color: var(--sc-text) !important;
  -webkit-text-fill-color: var(--sc-text) !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

/* Commodity tab pill button */
html.acc-smart-contrast #main-content .btn-outline-success {
  color: var(--sc-text) !important;
  border-color: var(--sc-border) !important;
  background-color: transparent !important;
}

/* Grayscale */
html.acc-grayscale { filter: grayscale(100%) !important; }

/* Highlight Links */
html.acc-highlight-links a {
  background: #ffff00 !important;
  color: #000 !important;
  text-decoration: underline !important;
  outline: 2px solid #000 !important;
  padding: 0 2px;
}

/* Highlight Headings */
html.acc-highlight-headings h1,
html.acc-highlight-headings h2,
html.acc-highlight-headings h3,
html.acc-highlight-headings h4,
html.acc-highlight-headings h5,
html.acc-highlight-headings h6 {
  background: #fff3b0 !important;
  color: #1f1f1f !important;
  outline: 2px solid #003e7f !important;
  padding: 2px 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Bold Text — applies to headings, paragraphs, buttons, labels, menus, tables, forms */
html.acc-bold-text body,
html.acc-bold-text h1,
html.acc-bold-text h2,
html.acc-bold-text h3,
html.acc-bold-text h4,
html.acc-bold-text h5,
html.acc-bold-text h6,
html.acc-bold-text p,
html.acc-bold-text span,
html.acc-bold-text li,
html.acc-bold-text a,
html.acc-bold-text label,
html.acc-bold-text td,
html.acc-bold-text th,
html.acc-bold-text button,
html.acc-bold-text .btn,
html.acc-bold-text .nav-link,
html.acc-bold-text input,
html.acc-bold-text select,
html.acc-bold-text textarea {
  font-weight: 700 !important;
}

/* Increased line-height & letter-spacing (readability) */
html.acc-increased-spacing body,
html.acc-increased-spacing p,
html.acc-increased-spacing li,
html.acc-increased-spacing span,
html.acc-increased-spacing td,
html.acc-increased-spacing th {
  line-height: 1.9 !important;
  letter-spacing: 0.04em !important;
  word-spacing: 0.06em !important;
}

/* Underline Links */
html.acc-underline-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* Reduce Motion */
html.acc-reduce-motion *,
html.acc-reduce-motion *::before,
html.acc-reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Large Cursor — CSS-only custom cursor, ~2.5x default size */
html.acc-large-cursor,
html.acc-large-cursor * {
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJNNiAyIEw2IDMzIEwxNCAyNiBMMTkuNSAzNyBMMjQuNSAzNC41IEwxOSAyMy41IEwyOSAyMy41IFoiIGZpbGw9IiMxMTExMTEiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIyLjUiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=") 6 4, auto !important;
}

html.acc-large-cursor a,
html.acc-large-cursor button,
html.acc-large-cursor .btn,
html.acc-large-cursor .nav-link,
html.acc-large-cursor [role="button"],
html.acc-large-cursor input[type="submit"],
html.acc-large-cursor input[type="button"],
html.acc-large-cursor select,
html.acc-large-cursor label,
html.acc-large-cursor .acc-toggle,
html.acc-large-cursor .btn-accessibility {
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJNMTUgNGMtMS40IDAtMi41IDEuMS0yLjUgMi41djExLjdsLTIuMi0yLjJhMi42IDIuNiAwIDAgMC0zLjcgMy43bDguNiA5LjljMS40IDEuNiAzLjQgMi40IDUuNSAyLjRoNC44YzMuMyAwIDYtMi43IDYtNnYtOS41YzAtMS40LTEuMS0yLjUtMi41LTIuNS0uNSAwLS45LjEtMS4zLjQtLjItMS4xLTEuMi0yLTIuNC0yLS41IDAtMSAuMi0xLjQuNC0uMy0xLTEuMy0xLjgtMi40LTEuOC0uNCAwLS44LjEtMS4xLjNWNi41QzE3LjUgNS4xIDE2LjQgNCAxNSA0eiIgZmlsbD0iIzExMTExMSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=") 6 4, pointer !important;
}

/* Hide Images — content images only; logo & nav icons stay visible.
   Covers both <img> tags AND CSS background-images (inline style=
   "background-image:..." as used on index.php's hero banner, plus
   the .hero-section/.header-section/.stats-section/.team-hero etc.
   classes used across other pages for banner photos). A dark fallback
   background-color is applied so white overlay text stays readable
   once the photo is gone. */
html.acc-hide-images img {
  visibility: hidden !important;
}

/* Restore the two branding exceptions. Higher specificity than the
   plain "img" rule above (class + tag beats tag alone) so these win
   even though both are !important — deliberately avoiding :not() with
   a compound/descendant selector, which some CSS parsers reject and
   would silently drop the ENTIRE hide-images rule if it ever happened. */
html.acc-hide-images .navbar-brand img,
html.acc-hide-images .footer-logo img,
html.acc-hide-images .acc-keep-visible {
  visibility: visible !important;
}

html.acc-hide-images [style*="background-image"],
html.acc-hide-images .hero-section,
html.acc-hide-images .header-section,
html.acc-hide-images .stats-section,
html.acc-hide-images .callback-section,
html.acc-hide-images .main-wrapper,
html.acc-hide-images .contact-left,
html.acc-hide-images .team-hero {
  background-image: none !important;
  background-color: #2b2b2b !important;
}

/* Honour OS prefers-reduced-motion for the panel slide */
@media (prefers-reduced-motion: reduce) {
  #acc-panel { transition: none; }
}

/* ══════════════════════════════════════════════════════════
   NAVIGATION — Skip To Content dropdown (spacing helper only;
   base styles for .acc-skip-label / .acc-skip-select live above)
   ══════════════════════════════════════════════════════════ */
.acc-grid.mt-2 { margin-top: 10px; }

/* Reading Guide toggle sits in its own single-column grid, full width */
.acc-grid-1 { grid-template-columns: 1fr; margin-top: 8px; }

/* The horizontal reading-guide line, appended to <body> by JS.
   Uses a "spotlight" technique: two huge box-shadows dim everything
   above and below a thin, clear strip that tracks the cursor —
   so only the current reading line stays at full contrast. */
#acc-reading-guide-line {
  position: fixed;
  left: 0;
  width: 100%;
  height: 2.4rem;
  transform: translateY(-50%);
  box-shadow:
    0 -9999px 0 9999px rgba(0, 0, 0, 0.35),
    0 9999px 0 9999px rgba(0, 0, 0, 0.35);
  border-top: 2px solid var(--acc-green);
  border-bottom: 2px solid var(--acc-green);
  pointer-events: none;
  z-index: 1060;
  display: none;
  transition: top 0.06s linear;
}

#acc-reading-guide-line.acc-guide-visible {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  #acc-reading-guide-line { transition: none; }
}
