/* ==========================================================================
   Estia Homes — Display Settings widget + user preference effects.
   First-party accessibility preferences (no third-party overlay). Styled in
   the 325 brand. Atkinson Hyperlegible self-hosted (latin 400/700).
   ========================================================================== */

@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/Atkinson-400.woff2') format('woff2')}
@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/Atkinson-700.woff2') format('woff2')}

/* ---- User preference effects -------------------------------------------- */
:root{--a11y-text-scale:1}
html{font-size:calc(100% * var(--a11y-text-scale))}   /* Text size scales rem-based type */

/* High contrast: darken text, open up neutrals, make muted-on-navy fully opaque */
html.a11y-high-contrast{--text:#13171E;--ink:#0A0D12;--muted:#48442F;--line:#B0A48F}
html.a11y-high-contrast .hero p.lede,
html.a11y-high-contrast .page-hero p,
html.a11y-high-contrast .hero-credit,
html.a11y-high-contrast .breadcrumb,
html.a11y-high-contrast .cta .who{color:#fff!important}
/* The footer is white chrome now (Cheryl, Aug 5), so high contrast darkens it
   rather than forcing #fff, which would have erased it. */
html.a11y-high-contrast footer,
html.a11y-high-contrast footer li a,
html.a11y-high-contrast .foot-tag,
html.a11y-high-contrast .foot-bottom{color:#0A0D12!important}
html.a11y-high-contrast .prose a,
html.a11y-high-contrast .section-lede a,
html.a11y-high-contrast .foot-grid a{text-decoration:underline!important;text-underline-offset:2px}

/* Readable font: Atkinson Hyperlegible everywhere (kept off the widget's own icon SVGs) */
html.a11y-dyslexia, html.a11y-dyslexia body, html.a11y-dyslexia :where(h1,h2,h3,h4,p,a,li,span,button,input,select,textarea,blockquote,figcaption,legend,label,dt,dd,summary){
  font-family:'Atkinson Hyperlegible','Roboto',system-ui,sans-serif !important;
}

/* Reduce motion: neutralise animations/transitions and reveal every hidden-on-scroll block */
html.a11y-reduce-motion *,html.a11y-reduce-motion *::before,html.a11y-reduce-motion *::after{
  animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important
}
html.a11y-reduce-motion :is(.stat,.element,.phase,.step-item,.adv,.value,.cc,.chip,.section-head,.adv-head,.how-head,.figure,.table-wrap,.pullquote,.editor-note,.post,.sources,.split>.txt,.hero-txt,.hero-media,.page-hero .inner,.cta .inner,.dignity .panel,.dignity .media,.article-body>*){
  opacity:1!important;transform:none!important
}

/* Highlight links: underline + bold content links (not buttons, brand, or the widget) */
html.a11y-highlight-links a:not(.btn):not(.brand):not(.a11y-launcher):not(.a11y-panel a){
  text-decoration:underline!important;text-underline-offset:2px;font-weight:700!important
}

/* ---- Launcher ----------------------------------------------------------- */
.a11y-launcher{
  position:fixed;left:20px;bottom:20px;z-index:9990;
  width:48px;height:48px;border-radius:50%;border:none;cursor:pointer;
  background:var(--navy,#284278);color:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 20px rgba(40,66,120,.4);transition:transform .15s ease,background .15s ease
}
.a11y-launcher svg{width:26px;height:26px}
.a11y-launcher:hover{background:var(--blue-deep,#166BB4);transform:translateY(-2px)}
.a11y-launcher:focus-visible{outline:3px solid var(--blue-deep,#166BB4);outline-offset:3px}

/* ---- Panel -------------------------------------------------------------- */
.a11y-panel{
  position:fixed;left:20px;bottom:80px;z-index:9991;
  width:min(340px,calc(100vw - 40px));max-height:calc(100vh - 120px);overflow-y:auto;
  background:#fff;color:#38404F;border:1px solid var(--line,#D6CEC7);border-radius:10px;
  box-shadow:0 24px 60px rgba(40,66,120,.28);
  font-family:'Roboto',system-ui,sans-serif;font-size:14px;line-height:1.5;
  opacity:0;transform:translateY(10px) scale(.98);transform-origin:bottom left;
  transition:opacity .2s ease,transform .2s ease
}
.a11y-panel.is-open{opacity:1;transform:translateY(0) scale(1)}
.a11y-panel[hidden]{display:none}

.a11y-panel__head{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px 18px;background:var(--navy,#284278);border-radius:10px 10px 0 0}
.a11y-panel__head h2{margin:0;font-family:'Poppins','Roboto',sans-serif;font-size:16px;font-weight:600;color:#fff;letter-spacing:.01em}
.a11y-panel__close{width:30px;height:30px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;
  background:transparent;border:1px solid rgba(255,255,255,.35);border-radius:6px;color:#fff;cursor:pointer}
.a11y-panel__close svg{width:16px;height:16px}
.a11y-panel__close:hover{background:rgba(255,255,255,.12)}
.a11y-panel__close:focus-visible,.a11y-panel button:focus-visible{outline:3px solid var(--blue,#81C6EC);outline-offset:2px}

.a11y-panel__body{padding:6px 18px}
.a11y-group{border:none;margin:0;padding:16px 0 8px}
.a11y-group legend{padding:0;font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--blue-text,#1669B1)}
.a11y-size{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}
.a11y-size__btn{padding:12px 0;border:1px solid var(--line,#D6CEC7);border-radius:7px;background:#fff;
  font-family:'Poppins','Roboto',sans-serif;font-size:15px;font-weight:600;color:var(--navy,#284278);cursor:pointer;transition:.12s}
.a11y-size__btn:hover{border-color:var(--blue-deep,#166BB4)}
.a11y-size__btn[aria-checked="true"]{background:var(--navy,#284278);border-color:var(--navy,#284278);color:#fff}

.a11y-toggle{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:16px 0;border-top:1px solid var(--line,#D6CEC7)}
.a11y-toggle__title{display:block;font-weight:600;color:var(--navy,#284278);font-size:14px}
.a11y-toggle__sub{display:block;margin-top:3px;font-size:12px;color:#6D6857;line-height:1.4}
.a11y-switch{flex:0 0 auto;width:46px;height:26px;padding:0;border:none;border-radius:14px;cursor:pointer;
  background:#C9C0B2;position:relative;transition:background .15s ease;margin-top:2px}
.a11y-switch__track{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .15s ease}
.a11y-switch[aria-checked="true"]{background:var(--blue-deep,#166BB4)}
.a11y-switch[aria-checked="true"] .a11y-switch__track{transform:translateX(20px)}

.a11y-panel__foot{padding:16px 18px 18px;border-top:1px solid var(--line,#D6CEC7)}
.a11y-reset{width:100%;padding:11px;border:1px solid var(--navy,#284278);border-radius:7px;background:#fff;
  font-family:'Poppins','Roboto',sans-serif;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--navy,#284278);cursor:pointer;transition:.12s}
.a11y-reset:hover{background:var(--navy,#284278);color:#fff}
.a11y-panel__note{margin:12px 0 0;text-align:center;font-size:11.5px;color:#6D6857}

@media (prefers-reduced-motion:reduce){.a11y-launcher,.a11y-panel{transition:none}}
