/* S&F Marine Construction — Accessibility Widget (see js/accessibility-widget.js)
   Brand: ink #0e0f10 · amber #f6a623 · paper #fffdf9 · Saira / Barlow

   Corner stack (bottom-right): FluxGrid chat launcher at the bottom, this
   launcher above it. Below 768px the fixed .mbar call bar (56px + safe area)
   owns the bottom edge, so both launchers move up to clear it. */

/* The open chat window shares this corner. Its stacking context must sit above
   this launcher or the launcher intercepts clicks on the chat send button, and
   below the privacy banner. !important: widget.js re-declares --fg-chat-z in an
   injected <style> from the worker config (9999), which otherwise wins. */
#fg-chat-root { --fg-chat-z: 2147483400 !important; }
@media (max-width: 767px) {
  .fg-chat-launcher-wrap { bottom: calc(72px + env(safe-area-inset-bottom)) !important; right: 16px !important; }
}

.sf-a11y-launch {
  position: fixed;
  right: 26px;
  bottom: 92px;
  z-index: 2147483300;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #f6a623;
  background: #0e0f10;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgb(14 15 16 / 0.35);
  transition: background .15s ease, transform .15s ease;
}
.sf-a11y-launch:hover { background: #26292c; transform: translateY(-2px); }
.sf-a11y-launch:focus-visible { outline: 3px solid #f6a623; outline-offset: 3px; }
.sf-a11y-launch svg { width: 28px; height: 28px; }

/* ── Panel ── */
.sf-a11y-panel {
  position: fixed;
  right: 18px;
  bottom: 152px;
  z-index: 2147483301;
  width: min(330px, calc(100vw - 36px));
  max-height: min(70vh, 620px);
  overflow-y: auto;
  background: #fffdf9;
  color: #0e0f10;
  border: 1px solid #e2dbcf;
  border-top: 5px solid #f6a623;
  border-radius: 6px;
  box-shadow: 0 24px 60px -16px rgb(14 15 16 / 0.45);
  padding: 18px;
  display: none;
  font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.sf-a11y-panel.is-open { display: block; }

.sf-a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.sf-a11y-head h2 {
  margin: 0; font-family: 'Saira', 'Arial Narrow', sans-serif; font-style: italic;
  font-size: 1.3rem; font-weight: 800; color: #0e0f10;
}
.sf-a11y-close {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: 4px;
  background: #f4efe6; color: #0e0f10; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sf-a11y-close svg { width: 20px; height: 20px; }
.sf-a11y-close:hover { background: #e2dbcf; }
.sf-a11y-intro { margin: 0 0 14px; font-size: .92rem; line-height: 1.5; color: #5b5f63; }

/* ── Text-size stepper ── */
.sf-a11y-step {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #e2dbcf; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; background: #fff;
}
.sf-a11y-step__label { font-weight: 700; font-size: .95rem; }
.sf-a11y-step__ctrls { display: inline-flex; align-items: center; gap: 8px; }
.sf-a11y-step__btn {
  width: 38px; height: 38px; border: 1.5px solid #c9ced2; border-radius: 4px;
  background: #fff; color: #0e0f10; font-weight: 700; font-size: 1.1rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sf-a11y-step__btn:hover { border-color: #d9861a; }
.sf-a11y-step__btn[disabled] { opacity: .4; cursor: default; }
.sf-a11y-step__val { min-width: 2.6em; text-align: center; font-weight: 700; font-size: .9rem; }

/* ── Toggle options ── */
.sf-a11y-opts { display: grid; gap: 8px; }
.sf-a11y-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 1px solid #e2dbcf; border-radius: 6px; background: #fff; color: #0e0f10;
  padding: 10px 12px; font: inherit; font-weight: 600; font-size: .98rem; text-align: left; cursor: pointer;
}
.sf-a11y-opt:hover { border-color: #d9861a; }
.sf-a11y-opt__icon {
  flex: none; width: 34px; height: 34px; border-radius: 4px; background: #f4efe6; color: #0e0f10;
  display: inline-flex; align-items: center; justify-content: center;
}
.sf-a11y-opt__icon svg { width: 19px; height: 19px; }
.sf-a11y-opt__txt { flex: 1 1 auto; }
.sf-a11y-opt__state {
  flex: none; font-family: 'Saira', 'Arial Narrow', sans-serif;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5b5f63;
}
.sf-a11y-opt[aria-pressed="true"] { background: #0e0f10; color: #fff; border-color: #0e0f10; }
.sf-a11y-opt[aria-pressed="true"] .sf-a11y-opt__icon { background: #f6a623; color: #0e0f10; }
.sf-a11y-opt[aria-pressed="true"] .sf-a11y-opt__state { color: #f6a623; }

.sf-a11y-panel button:focus-visible { outline: 3px solid #f6a623; outline-offset: 2px; }

.sf-a11y-reset {
  margin-top: 14px; width: 100%; border: 1.5px solid #0e0f10; border-radius: 4px;
  background: transparent; color: #0e0f10; padding: 10px 14px;
  font-family: 'Saira', 'Arial Narrow', sans-serif; font-weight: 700; font-size: .85rem;
  letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
}
.sf-a11y-reset:hover { background: #f4efe6; }
.sf-a11y-foot { margin: 12px 0 0; font-size: .85rem; line-height: 1.5; color: #5b5f63; text-align: center; }
.sf-a11y-foot a { color: #2f5d74; }

@media (max-width: 767px) {
  .sf-a11y-launch { right: 18px; bottom: calc(140px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
  .sf-a11y-panel { right: 10px; left: 10px; width: auto; bottom: calc(196px + env(safe-area-inset-bottom)); max-height: calc(100vh - 230px); }
}

/* =========================================================================
   Applied accessibility states (classes set on <html>)
   ========================================================================= */

/* Text size — the site's type is rem-based */
html.sf-fs-1 { font-size: 106.25%; }
html.sf-fs-2 { font-size: 112.5%; }
html.sf-fs-3 { font-size: 125%; }

/* High contrast — push the muted design tokens to full contrast on both the
   light and the ink sections, and outline cards and controls. */
html.sf-contrast {
  --stone: #000;
  --on-dark-muted: #fff;
  --tide: #0b2a38;
  --line: #0e0f10;
  --paper: #fff;
  --sand: #fff;
}
html.sf-contrast a { text-decoration: underline !important; }
html.sf-contrast input,
html.sf-contrast select,
html.sf-contrast textarea { border: 2px solid #0e0f10 !important; }
html.sf-contrast .card,
html.sf-contrast .svc,
html.sf-contrast .side-card { outline: 2px solid currentColor; }

/* Highlight links */
html.sf-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  outline: 2px dashed #f6a623;
  outline-offset: 2px;
}

/* Readable font — a highly legible face with generous spacing */
html.sf-readable body,
html.sf-readable p,
html.sf-readable li,
html.sf-readable a,
html.sf-readable h1, html.sf-readable h2, html.sf-readable h3, html.sf-readable h4,
html.sf-readable button, html.sf-readable input, html.sf-readable textarea,
html.sf-readable select, html.sf-readable .lead {
  font-family: Verdana, Tahoma, 'Segoe UI', Arial, sans-serif !important;
  font-style: normal !important;
  letter-spacing: 0.02em !important;
  word-spacing: 0.08em !important;
}
html.sf-readable p, html.sf-readable li, html.sf-readable .lead { line-height: 1.85 !important; }

/* Reduce motion — stop animations, transitions, smooth scroll, and reveal effects */
html.sf-reduce-motion,
html.sf-reduce-motion *,
html.sf-reduce-motion *::before,
html.sf-reduce-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.sf-reduce-motion .reveal { opacity: 1 !important; transform: none !important; }
