/* Reading & Display Options: accessibility button + panel. Follows the SFS theme (navy, gold, burgundy,
   Poppins headings, Plus Jakarta Sans text, rounded cards). Sits bottom-left, above the action bar. */

/* ---------- button ---------- */
/* A tab fixed to the screen edge (not a floating round icon): blue, white edge, gold strip, big icon; the word slides out on hover. */
.ax-fab{
  position:fixed;left:0;bottom:calc(60px + 1.1rem);z-index:9997;
  display:flex;align-items:center;gap:0;height:56px;padding:0 .9rem 0 .95rem;border:2px solid #fff;border-left:0;border-radius:0 16px 16px 0;
  background:var(--navy-600,#1C55B4);color:#fff;cursor:pointer;font:700 .95rem/1 var(--font-body,'Plus Jakarta Sans',sans-serif);letter-spacing:.01em;
  box-shadow:inset 5px 0 0 var(--gold-300,#E5C965),0 0 0 1px rgba(10,31,66,.18),0 12px 26px -10px rgba(6,19,43,.55);
  transition:gap .3s ease,padding .25s ease,background .25s ease,box-shadow .25s ease;
}
.ax-fab-label{max-width:0;overflow:hidden;white-space:nowrap;opacity:0;transition:max-width .35s ease,opacity .25s ease}
.ax-fab:hover .ax-fab-label,.ax-fab:focus-visible .ax-fab-label,.ax-fab[aria-expanded="true"] .ax-fab-label{max-width:140px;opacity:1}
.ax-fab-ic{display:grid;place-items:center;width:32px;height:32px;color:#fff}
.ax-fab-ic svg{width:32px;height:32px}
.ax-fab:hover,.ax-fab:focus-visible,.ax-fab[aria-expanded="true"]{gap:.6rem;padding-left:1.25rem;padding-right:1.15rem;background:var(--navy-700,#14418C);box-shadow:inset 8px 0 0 var(--gold-300,#E5C965),0 0 0 1px rgba(10,31,66,.25),0 16px 30px -10px rgba(6,19,43,.6)}
.ax-fab:focus-visible{outline:3px solid var(--gold-300,#E5C965);outline-offset:3px}
.ax-fab[hidden]{display:none}

/* ---------- panel (card rising from the button) ---------- */
.ax-panel{
  position:fixed;left:1.1rem;bottom:calc(60px + 1.1rem + 76px);z-index:2147483010; /* above the chat widget while open */
  display:flex;flex-direction:column;width:min(400px,calc(100vw - 2.2rem));max-height:calc(100vh - 60px - 1.1rem - 76px - 1.5rem);
  border-radius:22px;background:var(--cream,#FAF8F4);color:var(--ink,#10131F);overflow:hidden;
  font-family:var(--font-body,'Plus Jakarta Sans',sans-serif);
  box-shadow:0 40px 80px -30px rgba(6,19,43,.6),0 0 0 1px rgba(10,31,66,.08);
  transform-origin:24px calc(100% + 40px);animation:axRise .28s cubic-bezier(.2,.8,.2,1);
}
.ax-panel[hidden]{display:none}
@keyframes axRise{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}

.ax-head{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.25rem 1.25rem 1.15rem;color:#fff;
  background:radial-gradient(26rem 12rem at 110% 0%,rgba(166,29,45,.55),transparent 60%),linear-gradient(140deg,var(--navy-800,#0D2D62),var(--navy-900,#0A1F42))}
.ax-head::after{content:"";position:absolute;left:1.25rem;bottom:0;width:56px;height:3px;border-radius:3px 3px 0 0;background:var(--grad-gold,linear-gradient(90deg,#E5C965,#B08A1E))}
.ax-kicker{margin:0 0 .3rem;font-size:.66rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:var(--gold-300,#E5C965)}
.ax-title{margin:0;font-family:var(--font-display,'Poppins',sans-serif);font-weight:600;font-size:1.18rem;line-height:1.25;color:#fff}
.ax-sub{margin:.45rem 0 0;font-size:.8rem;line-height:1.5;color:rgba(255,255,255,.78)}
.ax-close{flex:none;display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:11px;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;transition:background .2s}
.ax-close:hover{background:rgba(255,255,255,.24)}
.ax-close svg{width:18px;height:18px}
.ax-close:focus-visible{outline:2px solid var(--gold-300,#E5C965);outline-offset:2px}
.ax-title{font-size:1.12rem}
.ax-sub{margin:.35rem 0 0;font-size:.78rem}

.ax-body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:.9rem .9rem .6rem;scrollbar-width:thin}

/* quick profiles: one row of small buttons */
.ax-label{margin:0 .15rem .45rem;font-size:.68rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--burg-600,#A61D2D)}
.ax-profiles{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:.9rem}
.ax-profile{padding:.45rem .75rem;border:1.5px solid var(--line,#E4E1D6);border-radius:99px;background:#fff;color:var(--navy-900,#0A1F42);
  font:600 .74rem/1 var(--font-body,'Plus Jakarta Sans',sans-serif);cursor:pointer;transition:border-color .2s,background .2s,color .2s}
.ax-profile:hover{border-color:var(--gold-500,#C9A227)}
.ax-profile[aria-pressed="true"]{background:var(--navy-900,#0A1F42);border-color:var(--navy-900,#0A1F42);color:var(--gold-300,#E5C965)}

/* the grid: big tiles, icon + short name, 3 per row */
.ax-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}
.ax-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;min-height:104px;padding:.8rem .4rem .7rem;
  border:1.5px solid transparent;border-radius:16px;background:#fff;color:var(--navy-900,#0A1F42);cursor:pointer;text-align:center;
  font-family:var(--font-body,'Plus Jakarta Sans',sans-serif);box-shadow:0 6px 16px -12px rgba(10,31,66,.35);transition:border-color .2s,background .2s,transform .15s}
.ax-tile:hover{border-color:var(--gold-500,#C9A227);transform:translateY(-1px)}
.ax-tile-ic{display:grid;place-items:center;width:30px;height:30px;color:var(--navy-800,#0D2D62);transition:color .2s}
.ax-tile-ic svg{width:26px;height:26px}
.ax-tile-name{font-size:.74rem;font-weight:700;line-height:1.2}
.ax-tile-val{font-size:.66rem;font-weight:600;color:var(--ink-mute,#6A7080);min-height:.8rem}
.ax-steps{display:flex;gap:3px}
.ax-steps i{width:10px;height:4px;border-radius:3px;background:var(--line,#E4E1D6)}
.ax-steps i.on{background:var(--gold-500,#C9A227)}
/* on: navy tile, gold icon */
.ax-tile[aria-pressed="true"]{background:var(--navy-900,#0A1F42);border-color:var(--navy-900,#0A1F42);color:#fff}
.ax-tile[aria-pressed="true"]::after{content:"";position:absolute;left:30%;right:30%;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--grad-gold,linear-gradient(90deg,#E5C965,#B08A1E))}
.ax-tile[aria-pressed="true"] .ax-tile-ic{color:var(--gold-300,#E5C965)}
.ax-tile[aria-pressed="true"] .ax-tile-val{color:var(--gold-300,#E5C965)}
.ax-tile[aria-pressed="true"] .ax-steps i{background:rgba(255,255,255,.2)}
.ax-tile[aria-pressed="true"] .ax-steps i.on{background:var(--gold-300,#E5C965)}
.ax-tile:focus-visible,.ax-profile:focus-visible,.ax-reset:focus-visible,.ax-link:focus-visible{outline:2px solid var(--navy-600,#1C55B4);outline-offset:2px}

/* footer */
.ax-foot{display:flex;align-items:center;gap:.8rem;padding:.75rem .9rem .5rem;border-top:1px solid var(--line,#E4E1D6);background:#fff}
.ax-reset{flex:1;display:flex;align-items:center;justify-content:center;gap:.45rem;padding:.7rem 1rem;border:0;border-radius:12px;background:var(--navy-900,#0A1F42);color:#fff;
  font:600 .82rem/1 var(--font-body,'Plus Jakarta Sans',sans-serif);cursor:pointer;transition:background .2s}
.ax-reset:hover{background:var(--burg-600,#A61D2D)}
.ax-reset svg{width:16px;height:16px}
.ax-link{flex:none;border:0;background:none;padding:.3rem 0;color:var(--ink-soft,#3B4152);font:600 .74rem/1 var(--font-body,'Plus Jakarta Sans',sans-serif);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.ax-link:hover{color:var(--burg-600,#A61D2D)}
.ax-note{margin:0;padding:0 .9rem .7rem;background:#fff;font-size:.66rem;color:var(--ink-mute,#6A7080)}

/* ---------- phones: smaller button, panel as a bottom sheet ---------- */
@media (max-width:640px){
  .ax-fab{bottom:calc(60px + .9rem);height:52px;padding:0 .8rem 0 .85rem;gap:0}
  .ax-fab:hover,.ax-fab:focus-visible,.ax-fab[aria-expanded="true"]{padding-left:1rem}
  .ax-fab-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .ax-fab-ic,.ax-fab-ic svg{width:30px;height:30px}
  .ax-panel{left:0;right:0;bottom:60px;width:auto;max-height:calc(100vh - 60px - 3rem);border-radius:22px 22px 0 0;transform-origin:50% 100%}
  .ax-tile{min-height:96px}
}
@media (max-width:340px){.ax-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (prefers-reduced-motion:reduce){.ax-panel{animation:none}.ax-fab,.ax-fab-label{transition:none}}
@media print{.ax-fab,.ax-panel{display:none!important}}

/* ================================================================
   Effects. Every rule leaves the button and panel (.ax-ui) alone.
   ================================================================ */
.ax-live{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ax-hint{margin:.6rem .2rem 0;font-size:.7rem;color:var(--ink-mute,#6A7080)}
.ax-hint[hidden]{display:none}

/* button on the right (admin choice): above the chat and back-to-top buttons */
.ax-side-right .ax-fab{left:auto;right:0;bottom:calc(60px + 9.5rem);border-left:2px solid #fff;border-right:0;border-radius:16px 0 0 16px;box-shadow:inset -5px 0 0 var(--gold-300,#E5C965),0 0 0 1px rgba(10,31,66,.18),0 12px 26px -10px rgba(6,19,43,.55)}
.ax-side-right .ax-fab:hover,.ax-side-right .ax-fab:focus-visible,.ax-side-right .ax-fab[aria-expanded="true"]{padding-left:.95rem;padding-right:1.35rem;box-shadow:inset -8px 0 0 var(--gold-300,#E5C965),0 0 0 1px rgba(10,31,66,.25),0 16px 30px -10px rgba(6,19,43,.6)}
.ax-side-right .ax-panel{left:auto;right:1.1rem;bottom:calc(60px + 9.5rem + 76px);max-height:calc(100vh - 60px - 9.5rem - 76px - 1.5rem);transform-origin:calc(100% - 24px) calc(100% + 40px)}
@media (max-width:640px){
  .ax-side-right .ax-fab{right:0;bottom:calc(60px + 8rem)}
  .ax-side-right .ax-panel{left:0;right:0;bottom:60px;max-height:calc(100vh - 60px - 3rem)}
}

/* text spacing */
html.ax-spacing-1 body *:not(.ax-ui):not(.ax-ui *){letter-spacing:.05em!important;word-spacing:.12em!important}
html.ax-spacing-2 body *:not(.ax-ui):not(.ax-ui *){letter-spacing:.1em!important;word-spacing:.22em!important}
html.ax-spacing-3 body *:not(.ax-ui):not(.ax-ui *){letter-spacing:.16em!important;word-spacing:.34em!important}
/* line height: set by the script (never tighter than the design) */
/* text alignment (text blocks only, so layouts keep their shape) */
html.ax-align-1 body :is(p,li,h1,h2,h3,h4,h5,h6,td,th,dd,dt,blockquote,figcaption,label,address):not(.ax-ui *){text-align:left!important}
html.ax-align-2 body :is(p,li,h1,h2,h3,h4,h5,h6,td,th,dd,dt,blockquote,figcaption,label,address):not(.ax-ui *){text-align:center!important}
html.ax-align-3 body :is(p,li,td,dd,blockquote,figcaption,address):not(.ax-ui *){text-align:justify!important}
/* readable fonts (free Google fonts, loaded only when chosen) */
html.ax-font-1 body *:not(.ax-ui):not(.ax-ui *):not(svg):not(svg *){font-family:'Lexend',system-ui,sans-serif!important}
html.ax-font-2 body *:not(.ax-ui):not(.ax-ui *):not(svg):not(svg *){font-family:'Atkinson Hyperlegible',system-ui,sans-serif!important}

/* contrast: dark */
html.ax-contrast-1 body,html.ax-contrast-1 body *:not(.ax-ui):not(.ax-ui *){background-color:#000!important;color:#fff!important;border-color:rgba(255,255,255,.4)!important;text-shadow:none!important;box-shadow:none!important}
html.ax-contrast-1 body a:not(.ax-ui *),html.ax-contrast-1 body a *:not(.ax-ui *){color:#FFE14D!important}
html.ax-contrast-1 body :is(button,input,select,textarea):not(.ax-ui *){border:1px solid #fff!important}
/* contrast: light */
html.ax-contrast-2 body,html.ax-contrast-2 body *:not(.ax-ui):not(.ax-ui *){background-color:#fff!important;color:#000!important;border-color:rgba(0,0,0,.35)!important;text-shadow:none!important}
html.ax-contrast-2 body a:not(.ax-ui *),html.ax-contrast-2 body a *:not(.ax-ui *){color:#0033CC!important}
html.ax-contrast-2 body :is(button,input,select,textarea):not(.ax-ui *){border:1px solid #000!important}
/* inverted colours and colour strength: one see-through layer over the page that recolours what is under it.
   (A filter on <html> would pin every fixed element - this panel, the chat, the action bar - to the page bottom.)
   The panel, button, guide, mask and tips sit above the layer, so they keep their own colours. */
html.ax-contrast-3{--ax-inv:invert(1) hue-rotate(180deg)}
html.ax-saturation-1{--ax-sat:saturate(.45)}
html.ax-saturation-2{--ax-sat:saturate(1.9)}
html.ax-saturation-3{--ax-sat:grayscale(1)}
html.ax-contrast-3 body::after,html.ax-saturation body::after{content:"";position:fixed;inset:0;z-index:2147482999;pointer-events:none;-webkit-backdrop-filter:var(--ax-inv,) var(--ax-sat,);backdrop-filter:var(--ax-inv,) var(--ax-sat,)}
html.ax-contrast-3 body :is(img,picture,video,iframe,canvas):not(.ax-ui *){filter:invert(1) hue-rotate(180deg)}
html:is(.ax-contrast-3,.ax-saturation) .ax-fab{z-index:2147483005}
html:is(.ax-contrast-3,.ax-saturation) :is(.ax-guidebar,.ax-shade){z-index:2147483002}
html:is(.ax-contrast-3,.ax-saturation) .ax-tip{z-index:2147483008}

/* highlight links */
html.ax-links body a:not(.ax-ui *){outline:2px solid #C9A227!important;outline-offset:2px!important;background-color:rgba(229,201,101,.28)!important;text-decoration:underline!important;text-underline-offset:3px!important;border-radius:3px}

/* big cursor */
html.ax-cursor,html.ax-cursor *{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2.5l15 7.2-6.6 1.9-2.3 6.7z' fill='%230A1F42' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 6 4,auto!important}
html.ax-cursor :is(a,button,[role=button],summary,label,select):not(.ax-ui *),html.ax-cursor :is(a,button,[role=button],summary,label,select):not(.ax-ui *) *,html.ax-cursor .ax-ui :is(button,a){cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M9 11V4.5a1.5 1.5 0 0 1 3 0V10m0-1.5a1.5 1.5 0 0 1 3 0V11m0-1a1.5 1.5 0 0 1 3 0v4.5a6.5 6.5 0 0 1-6.5 6.5h-1A5.5 5.5 0 0 1 6 17.8L3.8 13a1.5 1.5 0 0 1 2.6-1.5L8 13.5V6.5' fill='%23E5C965' stroke='%230A1F42' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 12 4,pointer!important}

/* reading guide and mask (drawn by the script) */
.ax-guidebar{position:fixed;left:0;right:0;top:0;height:14px;z-index:2147482995;pointer-events:none;background:rgba(10,31,66,.12);border-top:3px solid #0A1F42;border-bottom:3px solid #C9A227;transform:translateY(-50%)}
.ax-shade{position:fixed;left:0;right:0;z-index:2147482995;pointer-events:none;background:rgba(6,19,43,.62)}
.ax-shade-top{top:0}
.ax-shade-bot{bottom:0}

/* labels on hover */
.ax-tip{position:fixed;z-index:2147482998;max-width:280px;padding:.45rem .65rem;border-radius:8px;background:#0A1F42;color:#fff;font:600 .8rem/1.35 'Plus Jakarta Sans',sans-serif;
  box-shadow:0 10px 24px -10px rgba(0,0,0,.5);pointer-events:none;border-left:3px solid #C9A227}

/* stop motion: animations and transitions finish at once (marquees, fades, sliding) */
html.ax-motion body *:not(.ax-ui):not(.ax-ui *),html.ax-motion body *:not(.ax-ui):not(.ax-ui *)::before,html.ax-motion body *:not(.ax-ui):not(.ax-ui *)::after{
  animation-duration:.001ms!important;animation-iteration-count:1!important;animation-delay:0s!important;transition-duration:.001ms!important;transition-delay:0s!important;scroll-behavior:auto!important}
html.ax-motion{scroll-behavior:auto!important}
/* the Sia chat girl stands still instead of moving */
html.ax-motion .sfsbot-sia--anim{display:none!important}
html.ax-motion .sfsbot-sia--still{display:block!important}

/* hide images */
html.ax-images body :is(img,picture,video,iframe,canvas):not(.ax-ui *):not(.sfsbot-sia){visibility:hidden!important}
html.ax-images body *:not(.ax-ui):not(.ax-ui *){background-image:none!important}

/* the part being read aloud */
.ax-reading{outline:3px solid #C9A227!important;outline-offset:4px;background-color:rgba(229,201,101,.22)!important;border-radius:4px}
