:root {
  --chapter-pill-fill: linear-gradient(#00333b 10%, #002d35 47%, #00666d);
  --chapter-pill-shine: linear-gradient(#629caa, #3c818b 25%, #06666b);
}

:is(
  .chapter .hit,
  html body.ew-site-theme.ew-site-theme.ew-site-theme :is(
    .prelude-landing-button, .ew-info-links a, .ew-prelude-chapter-link,
    .menu-toggle, .ew-journey-chapters a,
    .chapter-buttons a, .ew-chapter-list a, .page-turn a, .page-back,
    .back-link, .ew-local-top-nav a, .ew-chapters a
  )
) {
  position: relative;
  isolation: isolate;
  border-color: transparent !important;
  border-radius: 999px !important;
  background: var(--chapter-pill-fill) !important;
  box-shadow: inset 0 0 0 1px #24646a44, 0 1px 3px #03181a80 !important;
  color: #e8e5db !important;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 1px #042c32 !important;
}

:is(
  .chapter .hit,
  html body.ew-site-theme.ew-site-theme.ew-site-theme :is(
    .prelude-landing-button, .ew-info-links a, .ew-prelude-chapter-link,
    .menu-toggle, .ew-journey-chapters a,
    .chapter-buttons a, .ew-chapter-list a, .page-turn a, .page-back,
    .back-link, .ew-local-top-nav a, .ew-chapters a
  )
)::before {
  position: absolute;
  inset: 10% 4% 53%;
  z-index: -1;
  border-radius: 999px;
  background: var(--chapter-pill-shine);
  box-shadow: 0 -1px 2px #74a8b055;
  pointer-events: none;
  content: "";
}

/* Use the same teal palette on the numbered controls without moving their artwork hotspots. */
html body.ew-site-theme.ew-site-theme.ew-site-theme :is(
  a.ew-template-number, .ew-final-layout a.chapter-number, .ew-living-chapters > a.ew-number
) {
  isolation: isolate;
  border-color: transparent !important;
  background: var(--chapter-pill-fill) !important;
  box-shadow: inset 0 0 0 1px #24646a44, 0 1px 3px #03181a80 !important;
  color: #e8e5db !important;
}
html body.ew-site-theme.ew-site-theme.ew-site-theme :is(
  a.ew-template-number, .ew-final-layout a.chapter-number, .ew-living-chapters > a.ew-number
)::before {
  content: "";
  position: absolute;
  inset: 10% 4% 53%;
  z-index: -1;
  border: 0;
  border-radius: 999px;
  background: var(--chapter-pill-shine);
  pointer-events: none;
}
