/* Ellivien optional reading font.
   OpenDyslexic is distributed under the SIL Open Font License 1.1.
   The complete licence is published at /assets/accessibility/OFL.txt. */
@font-face {
  font-family: "OpenDyslexic";
  src: url("../accessibility/fonts/OpenDyslexic-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "OpenDyslexic";
  src: url("../accessibility/fonts/OpenDyslexic-Bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "OpenDyslexic";
  src: url("../accessibility/fonts/OpenDyslexic-Italic.woff2") format("woff2");
  font-display: swap;
  font-style: italic;
  font-weight: 400;
}

@font-face {
  font-family: "OpenDyslexic";
  src: url("../accessibility/fonts/OpenDyslexic-Bold-Italic.woff2") format("woff2");
  font-display: swap;
  font-style: italic;
  font-weight: 700;
}

.ellis-reading-preference {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
}

.ellis-translate-widget .ellis-reading-font-toggle {
  display: block;
  width: 100%;
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid rgba(124, 58, 237, 0.38);
  border-radius: 6px;
  background: #fff;
  color: #6d28d9;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.ellis-translate-widget .ellis-reading-font-toggle:hover,
.ellis-translate-widget .ellis-reading-font-toggle:focus-visible {
  background: #faf5ff;
  outline: 3px solid rgba(124, 58, 237, 0.3);
  outline-offset: 2px;
}

.ellis-translate-widget .ellis-reading-font-toggle[aria-pressed="true"] {
  border-color: #5b21b6;
  background: #5b21b6;
  color: #fff;
}

/* Keep the enlarged desktop panel above the article rather than over its title. */
@media screen and (min-width: 901px) {
  body.item-view .ellis-translate-widget {
    top: -108px !important;
  }
}

/* Apply the reader's choice to prose while preserving code, icons and Kindle. */
html[data-ellivien-reading-font="opendyslexic"] body.item-view .post-title,
html[data-ellivien-reading-font="opendyslexic"] body.item-view .post-title *,
html[data-ellivien-reading-font="opendyslexic"] body.item-view .post-header,
html[data-ellivien-reading-font="opendyslexic"] body.item-view .post-header *,
html[data-ellivien-reading-font="opendyslexic"] body.item-view .post-body,
html[data-ellivien-reading-font="opendyslexic"] body.item-view .post-body *:not(pre):not(pre *):not(code):not(code *):not(kbd):not(kbd *):not(samp):not(samp *):not(svg):not(svg *),
html[data-ellivien-reading-font="opendyslexic"] body.item-view .ellis-translate-widget,
html[data-ellivien-reading-font="opendyslexic"] body.item-view .ellis-translate-widget * {
  font-family: "OpenDyslexic", Arial, sans-serif !important;
}

html[data-ellivien-reading-font="opendyslexic"] body.item-view .post-body {
  line-height: 1.72;
}
