/* Accessibility: the accessibility menu (js/a11y.js), the modes it switches on (classes on <html>), and the
   site-wide accessibility fixes. Self-hosted, no third party. WCAG 2.2 AA (covers IS 5568 / WCAG 2.0 AA). */

/* ---------- menu button: lives in the fixed header, so it never covers page content or other fixed controls ---------- */
.a11y-fab {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-left: -14px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(255,255,255,.72); color: #0D1210;
  cursor: pointer; transition: background-color .2s, border-color .2s;
}
.a11y-fab svg { width: 24px; height: 24px; fill: currentColor; }
.a11y-fab:hover, .a11y-fab[aria-expanded="true"] { background: #FFFFFF; border-color: rgba(13,18,16,.55); }
.a11y-fab:focus-visible { outline: 2px solid var(--green-400); outline-offset: 3px; }
@media (max-width: 960px) {
  .nav .a11y-fab { margin-left: auto; margin-right: -16px; }   /* right before Menu */
  .nav .a11y-fab + .nav-menu { margin-left: 0; }
}

/* ---------- the panel (native modal <dialog>: focus moves in, Escape closes, the page behind is inert) ---------- */
.a11y-panel {
  position: fixed; inset: calc(86px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) auto auto;
  margin: 0; width: min(340px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 104px); overflow: auto; overscroll-behavior: contain;
  padding: 16px 18px 16px; border: 1px solid rgba(13,18,16,.18); border-radius: 14px;
  background: #FFFFFF; color: #0D1210; font: 400 15px/1.45 "Geist", system-ui, sans-serif; text-align: left;
  box-shadow: 0 30px 70px -24px rgba(13,18,16,.35), 0 10px 24px -12px rgba(13,18,16,.18);
}
.a11y-panel::backdrop { background: rgba(13,18,16,.16); }
@media (max-width: 480px) { .a11y-panel { top: calc(72px + env(safe-area-inset-top, 0px)); max-height: calc(100dvh - 88px); } }
.admin-bar .a11y-panel { top: 118px; max-height: calc(100dvh - 136px); }   /* WordPress toolbar (logged-in editors only) */
.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.a11y-head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; color: #0D1210; }
.a11y-x { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #0D1210; cursor: pointer; }
.a11y-x svg { width: 22px; height: 22px; fill: currentColor; }
.a11y-x:hover { background: rgba(13,18,16,.07); }
.a11y-lbl { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: #39413D; }
.a11y-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.a11y-seg button, .a11y-opt, .a11y-reset {
  min-height: 44px; font: inherit; color: #0D1210; background: #F2F4F2; border: 1px solid rgba(13,18,16,.2); border-radius: 9px; cursor: pointer;
}
.a11y-seg button:hover, .a11y-opt:hover, .a11y-reset:hover { border-color: rgba(13,18,16,.5); }
.a11y-seg button[aria-pressed="true"], .a11y-opt[aria-pressed="true"] { background: #1F7A49; border-color: #1F7A49; color: #FFFFFF; font-weight: 600; }
.a11y-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.a11y-opt { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; text-align: left; }
.a11y-tick { flex: none; width: 20px; height: 20px; fill: currentColor; visibility: hidden; }
.a11y-opt[aria-pressed="true"] .a11y-tick { visibility: visible; }
.a11y-opt[aria-disabled="true"] { cursor: default; }
.a11y-note { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: #39413D; }
.a11y-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(13,18,16,.14); }
.a11y-reset { padding: 0 16px; background: #FFFFFF; }
.a11y-foot a { display: inline-flex; align-items: center; min-height: 44px; color: #1F5945; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.a11y-panel :focus-visible { outline: 2px solid #1F5945; outline-offset: 2px; }
.a11y-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- site-wide fixes ---------- */
/* Text over the faint page photos (fixed .page-bg, vapor) lost up to a third of its contrast in the darker spots:
   small green labels and the secondary gray go one shade darker so they keep 4.5:1 everywhere (WCAG 1.4.3).
   Dark sections (.fband) set their own --gray, so they are not affected. */
:root { --green-text: #1F6342; --gray: #59605C; }
.fband { --green-text: var(--green-400); }
.eyebrow, .eyebrow.mono, .alt .n, .iscreen .kicker, .story3 .n, .timeline time, .spec td.mono { color: var(--green-text); }
.hero-art .lbl { fill: var(--green-text); }
/* a link that keyboard focus reaches before its scroll reveal has run is shown at once (WCAG 2.4.7) */
.rv-on:focus-within { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; }
/* skip link (the WordPress theme prints it; same look in the static pages) */
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 110; padding: 11px 18px; border-radius: 8px; background: var(--green-lit-lo); color: #FFFFFF; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 16px; outline: 2px solid var(--white); outline-offset: 2px; }
/* lead form: inline error under the field (js/a11y.js) */
.f-err { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: #A3312A; }
.fband .f-err { color: #FF9C91; }
.f [aria-invalid="true"] { border-bottom-color: #A3312A !important; box-shadow: 0 1px 0 #A3312A; }
.fband .f [aria-invalid="true"] { border-bottom-color: #FF9C91 !important; box-shadow: 0 1px 0 #FF9C91; }

/* ---------- mode: high contrast ---------- */
html.a11y-contrast {
  --gray: #262D29; --gray-light: #0D1210; --line: rgba(13,18,16,.42); --line-strong: rgba(13,18,16,.78);
  --green-400: #1F5945; --green-lit: #1F5945; --green-lit-lo: #174A36; --green-text: #174A36;
}
html.a11y-contrast body { background: #FFFFFF; color: #0D1210; }
html.a11y-contrast body::after, html.a11y-contrast .page-bg, html.a11y-contrast .vapor, html.a11y-contrast .bgfx,
html.a11y-contrast .side-img, html.a11y-contrast .hero-waves, html.a11y-contrast .fband::before { display: none !important; }
html.a11y-contrast .nav, html.a11y-contrast .nav.solid { background: #FFFFFF; border-color: #0D1210; backdrop-filter: none; }
html.a11y-contrast .fband {
  --white: #FFFFFF; --gray-light: #FFFFFF; --gray: #E8EDEA; --line: rgba(255,255,255,.5); --line-strong: rgba(255,255,255,.85); --green-400: #8FE6B3;
  background: #000000;
}
html.a11y-contrast .fband-form { background: #000000; border-color: #FFFFFF; }
html.a11y-contrast .fband .f input, html.a11y-contrast .fband .f select, html.a11y-contrast .fband .f textarea { border-bottom-color: #FFFFFF; }
html.a11y-contrast .btn-ghost, html.a11y-contrast .btn-outline { border-color: #0D1210; background: #FFFFFF; color: #0D1210; }
html.a11y-contrast .fband .btn-ghost, html.a11y-contrast .fband .btn-outline { border-color: #FFFFFF; background: #000000; color: #FFFFFF; }
html.a11y-contrast .btn-primary, html.a11y-contrast .fband .btn-primary { background: #174A36; }
html.a11y-contrast main a:not(.btn):not(.fk-list a) { text-decoration: underline; text-underline-offset: 3px; }
html.a11y-contrast :focus-visible { outline: 3px solid #0D1210 !important; outline-offset: 2px !important; box-shadow: 0 0 0 6px #FFFFFF !important; }
html.a11y-contrast .fband :focus-visible { outline-color: #FFFFFF !important; box-shadow: 0 0 0 6px #000000 !important; }
html.a11y-contrast .tbd { color: #262D29; border-color: #0D1210; }
html.a11y-contrast ::placeholder { color: #39413D; opacity: 1; }

/* ---------- mode: highlight links ---------- */
html.a11y-links a:not(.btn):not(.skip-link) {
  text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important;
  background-color: #FFF4A3 !important; color: #0D1210 !important; box-shadow: 0 0 0 2px #FFF4A3; border-radius: 2px;
}
html.a11y-links a:not(.btn) svg { color: #0D1210 !important; }
html.a11y-links a.btn { outline: 3px dashed currentColor; outline-offset: 3px; }
html.a11y-links .fband a.btn { outline-color: #FFF4A3; }

/* ---------- mode: readable font + text spacing (WCAG 1.4.12 values) ---------- */
html.a11y-font body, html.a11y-font body *:not(svg):not(svg *) {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  letter-spacing: .12em !important; word-spacing: .16em !important;
}
html.a11y-font :where(p, li, dd, dt, label, td, th, summary, blockquote, figcaption) { line-height: 1.5 !important; }
html.a11y-font :where(h1, h2, h3, h4, .btn, .roll, .roll > span) { overflow-wrap: anywhere; }
html.a11y-font .btn { white-space: normal; height: auto; min-height: 52px; }
html.a11y-font .btn-sm { min-height: 40px; }
html.a11y-font .roll { height: auto; }
html.a11y-font .roll-b { display: none; }

/* ---------- mode: big cursor ---------- */
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3l30 27H22l8 15-6 3-8-15-10 9z' fill='%230D1210' stroke='%23FFFFFF' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
html.a11y-cursor :is(a[href], button, summary, label, select, [role="button"], input[type="range"], input[type="checkbox"], input[type="radio"]),
html.a11y-cursor :is(a[href], button, summary, label, select, [role="button"]) * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M17 4.5a3.5 3.5 0 0 1 7 0V20l1-.6a3.5 3.5 0 0 1 5 1.5l.6-.3a3.5 3.5 0 0 1 5 1.7 3.5 3.5 0 0 1 5 2.6V35c0 6-4 10.5-10 10.5h-6c-4 0-6.5-2-8.5-5L8 29a3.5 3.5 0 0 1 5.5-4.4L17 28z' fill='%23FFFFFF' stroke='%230D1210' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 19 3, pointer !important;
}
html.a11y-cursor :is(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), textarea) { cursor: text !important; }

/* ---------- motion: the menu itself does not animate; looping CSS animations stop under reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .a11y-fab, .skip-link { transition: none; }
}
html.no-motion .a11y-fab, html.no-motion .skip-link { transition: none; }
