/* Visitor preferences. Rules share the existing important appearance layer. */
@layer testin-appearance {
  html body #testin-accessibility,
  html body #testin-accessibility * {
    box-sizing: border-box !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-transform: none !important;
    text-shadow: none !important;
    text-decoration: none !important;
    color: #14213d !important;
    -webkit-text-fill-color: currentColor !important;
    background-image: none !important;
    animation: none !important;
    transition: none !important;
  }
  html body #testin-accessibility button,
  html body #testin-accessibility select { cursor: pointer; min-height: 44px !important; border: 1px solid #8292aa !important; border-radius: 9px !important; padding: 9px 13px !important; background: #fff !important; box-shadow: none !important; font-weight: 600 !important; }
  html body #testin-accessibility :is(button,select,input):focus-visible { outline: 3px solid #2457d6 !important; outline-offset: 3px !important; box-shadow: 0 0 0 2px #fff !important; }
  html body #testin-accessibility button:disabled { opacity: .5 !important; cursor: default; }
  html body #testin-accessibility #tta-open {
    position: fixed !important; z-index: 2147482000 !important; inset: auto auto calc(20px + var(--tta-preview-height,0px) + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)) !important;
    display: flex !important; align-items: center !important; justify-content: center !important; gap: 9px !important;
    min-width: 58px !important; height: 58px !important; padding: 11px 16px !important; border-radius: 32px !important; border: 2px solid #fff !important; color: #fff !important; background: #2457d6 !important;
    box-shadow: 0 3px 18px #0004 !important;
  }
  html body #testin-accessibility #tta-open[hidden] { display: none !important; }
  html body #testin-accessibility #tta-open :is(svg,span) { color: #fff !important; background: transparent !important; }
  html body #testin-accessibility #tta-open svg { display: block !important; width: 32px !important; height: 32px !important; flex: 0 0 32px; }
  html body #testin-accessibility #tta-open svg * { color: #fff !important; stroke: currentColor !important; fill: none !important; }
  html body #testin-accessibility .tta-options input { transform: none !important; color-scheme: light !important; }
  html body #testin-accessibility #tta-dialog {
    position: fixed !important; inset: auto auto calc(90px + var(--tta-preview-height,0px) + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)) !important;
    width: min(380px,calc(100vw - 32px)) !important; max-width: calc(100vw - 32px) !important;
    max-height: calc(100dvh - 122px - var(--tta-preview-height,0px) - env(safe-area-inset-bottom)) !important;
    margin: 0 !important; padding: 24px !important; overflow-y: auto !important; overscroll-behavior: contain !important;
    border: 1px solid #b6c4d8 !important; border-radius: 18px !important; background: #fff !important; color: #14213d !important; box-shadow: 0 12px 50px #0004 !important;
  }
  html body #testin-accessibility #tta-dialog:not([open]) { display: none !important; }
  html body #testin-accessibility #tta-dialog[open] { display: block !important; }
  html body #testin-accessibility #tta-dialog::backdrop { background: rgb(10 20 35 / .28); }
  html body #testin-accessibility .tta-heading { display: flex !important; justify-content: space-between !important; align-items: center !important; gap: 12px; background: transparent !important; }
  html body #testin-accessibility .tta-kicker { margin: 0 0 2px !important; color: #455570 !important; font-size: 12px !important; font-weight: 600 !important; }
  html body #testin-accessibility #tta-title { margin: 0 !important; font-size: 26px !important; line-height: 1.2 !important; font-weight: 700 !important; }
  html body #testin-accessibility #tta-close { font-size: 13px !important; }
  html body #testin-accessibility #tta-description { margin: 16px 0 20px !important; color: #455570 !important; font-size: 14px !important; }
  html body #testin-accessibility .tta-size { margin: 0 0 18px !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  html body #testin-accessibility legend,
  html body #testin-accessibility .tta-select-label { display: block !important; margin: 0 0 8px !important; padding: 0 !important; font-weight: 600 !important; background: transparent !important; }
  html body #testin-accessibility .tta-size-controls { display: grid !important; grid-template-columns: 52px 1fr 52px !important; align-items: center !important; gap: 12px; background: transparent !important; }
  html body #testin-accessibility .tta-size-controls button { font-size: 20px !important; }
  html body #testin-accessibility #tta-size-value { text-align: center !important; font-size: 18px !important; font-weight: 700 !important; background: transparent !important; }
  html body #testin-accessibility #tta-contrast { display: block !important; width: 100% !important; font-weight: 400 !important; font-size: 14px !important; }
  html body #testin-accessibility .tta-options { margin: 16px 0 !important; background: transparent !important; }
  html body #testin-accessibility .tta-options > label { display: flex !important; align-items: center !important; gap: 12px; min-height: 46px !important; padding: 9px 0 !important; margin: 0 !important; border-bottom: 1px solid #dbe2ed !important; cursor: pointer; background: transparent !important; }
  html body #testin-accessibility .tta-options input { flex: 0 0 22px; width: 22px !important; height: 22px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; appearance: auto !important; accent-color: #2457d6 !important; opacity: 1 !important; position: static !important; }
  html body #testin-accessibility .tta-options span { display: block !important; background: transparent !important; }
  html body #testin-accessibility .tta-help { color: #455570 !important; font-size: 12px !important; margin-top: 2px !important; }
  html body #testin-accessibility #tta-reset { display: block !important; width: 100% !important; color: #fff !important; background: #2457d6 !important; border-color: #2457d6 !important; font-size: 14px !important; }
  html body #testin-accessibility .tta-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }

  html[data-testin-a11y-scale] body [data-tta-font]:not(#testin-accessibility *) {
    font-size: calc(var(--tta-font-size) * var(--tta-scale)) !important;
    line-height: calc(var(--tta-line-height) * var(--tta-scale)) !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
  html[data-testin-a11y-scale] body #primary :is(.tpg-entry-copy,.tpg-entry-menu,.tpg-entry-feature,.tpg-entry-start) { min-width: 0 !important; max-width: 100% !important; }
  html[data-testin-a11y-readable] body :is(h1,h2,h3,h4,h5,h6,p,a,button,input,textarea,select,label,summary,li,dt,dd,th,td,caption,legend,figcaption,small,strong,b,em,time,span,div):not(#testin-accessibility *):not(.fa,.fas,.far,.fab,.material-icons) {
    font-family: Arial, Helvetica, sans-serif !important; font-style: normal !important;
  }
  html[data-testin-a11y-spacing] body :is(p,li,dt,dd,label,summary,th,td,caption,figcaption,a):not(#testin-accessibility *) {
    line-height: 1.7 !important; letter-spacing: .12em !important; word-spacing: .16em !important;
  }
  html[data-testin-a11y-links] body a:not(#testin-accessibility *) { text-decoration: underline !important; text-underline-offset: .2em !important; text-decoration-thickness: max(1px,.08em) !important; }
  html[data-testin-a11y-motion] { scroll-behavior: auto !important; }
  html[data-testin-a11y-motion] body *:not(#testin-accessibility *),
  html[data-testin-a11y-motion] body *:not(#testin-accessibility *)::before,
  html[data-testin-a11y-motion] body *:not(#testin-accessibility *)::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
  html[data-testin-a11y-contrast="dark"] { --tta-bg: #000; --tta-fg: #fff; --tta-link: #ffeb3b; color-scheme: dark; }
  html[data-testin-a11y-contrast="light"] { --tta-bg: #fff; --tta-fg: #000; --tta-link: #003b80; color-scheme: light; }
  html[data-testin-a11y-contrast] body,
  html[data-testin-a11y-contrast] body :is(header,nav,main,footer,section,article,aside,div,figure,figcaption,p,h1,h2,h3,h4,h5,h6,ul,ol,li,span,small,strong,b,em,i,time,details,summary,form,fieldset,legend,label,button,input,select,textarea,table,thead,tbody,tr,th,td,caption):not(#testin-accessibility):not(#testin-accessibility *) {
    background-color: var(--tta-bg) !important; background-image: none !important; color: var(--tta-fg) !important;
    -webkit-text-fill-color: currentColor !important; border-color: var(--tta-fg) !important; text-shadow: none !important; box-shadow: none !important;
  }
  html[data-testin-a11y-contrast] body a:not(#testin-accessibility *),
  html[data-testin-a11y-contrast] body a :is(span,strong,em):not(#testin-accessibility *) {
    background-color: var(--tta-bg) !important; color: var(--tta-link) !important; -webkit-text-fill-color: currentColor !important; text-decoration: underline !important;
  }
  html[data-testin-a11y-contrast] body :is(button,input,select,textarea):not(#testin-accessibility *) { border: 2px solid var(--tta-fg) !important; }
  html[data-testin-a11y-contrast] body :focus-visible:not(#testin-accessibility *) { outline: 3px solid var(--tta-link) !important; outline-offset: 4px !important; }
}
@media (max-width: 600px) {
  @layer testin-appearance {
    html body #testin-accessibility .tta-launcher-label { display: none !important; }
    html body #testin-accessibility #tta-open { padding: 11px !important; }
    html body #testin-accessibility #tta-dialog { padding: 18px !important; }
  }
}
@media (max-height: 800px) {
  @layer testin-appearance {
    html body #testin-accessibility :is(.tta-options .tta-help,.tta-kicker) { display: none !important; }
    html body #testin-accessibility #tta-description { margin: 12px 0 !important; font-size: 13px !important; }
    html body #testin-accessibility #tta-dialog { padding: 20px !important; }
    html body #testin-accessibility .tta-size { margin-bottom: 12px !important; }
    html body #testin-accessibility .tta-size-controls button { padding: 6px 10px !important; }
    html body #testin-accessibility .tta-options { margin: 12px 0 !important; }
    html body #testin-accessibility .tta-options > label { min-height: 44px !important; padding: 8px 0 !important; }
  }
}
@media (forced-colors: active) {
  @layer testin-appearance {
    html body #testin-accessibility #tta-open,
    html body #testin-accessibility #tta-reset { forced-color-adjust: auto; border: 2px solid ButtonText !important; }
  }
}

/* Keyboard focus remains visible in both appearance modes. */
@layer testin-appearance {
  html body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
    outline: 3px solid #2457d6 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px #fff !important;
  }
  html body :is(button,[role="button"],summary) { min-inline-size:24px; min-block-size:24px; }
  html[data-testin-a11y-spacing] body :is(p):not(#testin-accessibility *) { margin-block-end:2em !important; }
  html[data-testin-a11y-scale] body :is(button,summary,select):not(#testin-accessibility *) { height:auto; white-space:normal; }
  html body #testin-accessibility #tta-dialog { scroll-padding-block:16px; }
  html body #testin-accessibility [id] { scroll-margin-block:16px; }
}
@media (forced-colors: active) {
  html body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline-color:Highlight !important; }
}

