/* ===== Accessibility menu (self-hosted, no third-party widget) ===== */

.a11y-btn {
  position: fixed; bottom: 18px; left: 18px; z-index: 200;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: #0f1c2e; color: #fff; border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(15, 28, 46, .3);
  cursor: pointer;
}
.a11y-btn svg { width: 28px; height: 28px; fill: currentColor; }
.a11y-btn:hover { background: #0b7a62; }
.a11y-btn:focus-visible { outline: 3px solid #2bb38a; outline-offset: 3px; }

.a11y-panel {
  position: fixed; bottom: 82px; left: 18px; z-index: 201;
  width: min(320px, calc(100vw - 36px)); max-height: calc(100vh - 110px); overflow: auto;
  background: #fff; color: #0f1c2e; border: 1px solid #ddd8cc; border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 28, 46, .25);
  padding: 16px; font-family: Arial, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.4;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 1.1rem; margin: 0 0 12px; color: #0f1c2e; font-family: inherit; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 64px; padding: 8px 6px; border-radius: 10px;
  background: #f7f5f0; color: #0f1c2e; border: 2px solid #ddd8cc;
  font: 600 .88rem/1.25 Arial, "Segoe UI", sans-serif; text-align: center; cursor: pointer;
}
.a11y-opt .ic { font-size: 1.15rem; line-height: 1; }
.a11y-opt[aria-pressed="true"] { background: #0b7a62; color: #fff; border-color: #0b7a62; }
.a11y-opt:focus-visible, .a11y-row button:focus-visible, .a11y-close:focus-visible, .a11y-panel a:focus-visible { outline: 3px solid #2bb38a; outline-offset: 2px; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding: 8px 10px; background: #f7f5f0; border-radius: 10px; font-weight: 600; }
.a11y-row div { display: flex; gap: 6px; }
.a11y-row button { width: 40px; height: 36px; border-radius: 8px; border: 2px solid #ddd8cc; background: #fff; color: #0f1c2e; font: 700 1rem Arial, sans-serif; cursor: pointer; }
.a11y-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.a11y-foot a { color: #0b7a62; font-weight: 700; }
.a11y-reset { border: 0; background: none; color: #0f1c2e; text-decoration: underline; font: 600 .9rem Arial, sans-serif; cursor: pointer; padding: 4px; }
.a11y-close { position: absolute; top: 8px; inset-inline-end: 8px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: #f7f5f0; color: #0f1c2e; font-size: 1.2rem; cursor: pointer; }
.a11y-panel { position: fixed; }

/* ---- effects ---- */
html.a11y-zoom-1 body { zoom: 1.15; }
html.a11y-zoom-2 body { zoom: 1.3; }
html.a11y-zoom-3 body { zoom: 1.5; }

html.a11y-contrast {
  --ink: #000; --ink-2: #000; --text: #000; --muted: #1b1b1b; --line: #555;
  --paper: #fff; --white: #fff; --tint: #fff; --accent: #005a46; --accent-2: #005a46;
  /* FMEA timeline page variables */
  --bg: #fff; --panel: #fff; --panel-soft: #fff; --ink-soft: #111; --ink-faint: #222; --line-soft: #555; --accent-deep: #003d30;
}
html.a11y-contrast body { background: #fff !important; color: #000 !important; }
html.a11y-contrast .section-dark, html.a11y-contrast .site-footer { background: #000 !important; color: #fff !important; }
html.a11y-contrast .section-dark *, html.a11y-contrast .site-footer * { color: #fff !important; }
html.a11y-contrast .hero { background-image: none !important; }

html.a11y-links a:not(.a11y-btn) { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px dashed currentColor; outline-offset: 2px; }

html.a11y-font body, html.a11y-font body *:not(svg):not(svg *) { font-family: Arial, "Segoe UI", sans-serif !important; letter-spacing: .02em; word-spacing: .08em; }

html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-still .reveal, html.a11y-still .tl-item { opacity: 1 !important; transform: none !important; }

html.a11y-cursor, html.a11y-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 9-7 2 4 8-3 1-4-8-6 5z' fill='%23000' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") 4 2, auto !important; }

@media print { .a11y-btn, .a11y-panel { display: none !important; } }
