/* The journey of a medicine (Drug Discovery page). Everything is prefixed jn- so it cannot touch other pages. */
.jn-section { background: #fff; }
.jn-player { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.jn-scene { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 1 / 1; min-height: 300px; max-height: 640px; width: 100%;
  background: radial-gradient(70% 60% at 85% 8%, #c4f1e6, transparent 70%), radial-gradient(70% 60% at 8% 90%, #ffd6b0, transparent 70%), #fdf3e3; box-shadow: 0 24px 60px rgba(120, 80, 20, .16); }
.jn-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* the big headline at the foot of the scene, over a soft fade so it reads whatever is behind it */
.jn-head { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 22px 24px; text-align: center; pointer-events: none;
  background: linear-gradient(to bottom, rgba(253, 243, 227, 0), rgba(253, 243, 227, .9) 52%, rgba(253, 243, 227, .97)); }
.jn-head h3 { margin: 0; text-wrap: balance; font-size: clamp(1.4rem, 3.8vw, 2.2rem); line-height: 1.12; letter-spacing: -.02em; color: #14213d; font-weight: 800; }
.jn-head h3 em { font-style: normal; color: #e0881a; }
.jn-head p { margin: 8px auto 0; max-width: 34ch; font-size: .92rem; line-height: 1.45; color: #6b6458; font-weight: 600; }
.jn-head.swap h3, .jn-head.swap p { animation: jn-swap .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes jn-swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* the card that floats beside the gate the molecule is in */
.jn-card { position: absolute; left: 60%; top: 0; width: min(37%, 200px); padding: 10px 14px 12px; border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: 0 14px 34px rgba(60, 40, 10, .17), 0 1px 0 rgba(255, 255, 255, .8) inset;
  display: grid; gap: 2px; opacity: 0; transform: translate3d(10px, var(--y, 0px), 0) scale(.96); transition: opacity .35s ease, transform .4s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.jn-card.on { opacity: 1; transform: translate3d(0, var(--y, 0px), 0) scale(1); }
.jn-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.jn-card-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--c, #0e9fa2); color: #fff; font-size: .78rem; font-weight: 800; }
.jn-card small { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a8173; }
.jn-card b { font-size: clamp(1.15rem, 2.8vw, 1.6rem); line-height: 1.1; color: #14213d; letter-spacing: -.01em; }
.jn-card span:last-child { font-size: .78rem; line-height: 1.35; color: #6b6458; font-weight: 600; }
.jn-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(20, 33, 61, .08); }
.jn-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0e9fa2, #e0881a); }

.jn-info { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 26px; border-radius: 28px; background: #fffaf1; border: 1.5px solid #f0e4cf; }
.jn-step { margin: 0; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #b3541e; }
.jn-info h3 { margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.2; color: #14213d; }
.jn-story { margin: 0; line-height: 1.7; color: #3b4258; font-size: 1.02rem; }
.jn-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.jn-meta[hidden] { display: none; }
.jn-meta li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid #f0e4cf; font-size: .84rem; font-weight: 650; color: #3b4258; }
.jn-meta svg { width: 15px; height: 15px; flex: none; color: #b3541e; }
.jn-focus { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; padding: 9px 12px; border-radius: 12px; background: #e8fbf6; color: #0b6b55; font-size: .86rem; font-weight: 700; }
.jn-focus[hidden] { display: none; }
.jn-focus svg { width: 16px; height: 16px; flex: none; }

.jn-controls { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.jn-buttons { display: flex; gap: 8px; flex: none; }
.jn-ctl { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid #e7dfd0; background: #fff; color: #14213d; cursor: pointer; transition: transform .14s ease, border-color .14s ease; }
.jn-ctl:hover { border-color: #14213d; }
.jn-ctl:active { transform: scale(.94); }
.jn-ctl:focus-visible, .jn-stop:focus-visible { outline: 3px solid #1747ca; outline-offset: 2px; }
.jn-play { background: #14213d; border-color: #14213d; color: #fff; }
.jn-stops { display: flex; gap: 8px; margin: 0; padding: 4px 2px 8px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; flex: 1; min-width: 0; scrollbar-width: thin; }
.jn-stops li { flex: none; scroll-snap-align: center; }
.jn-stop { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border: 1.5px solid #e7dfd0; border-radius: 999px; background: #fff; font: inherit; font-size: .86rem; font-weight: 700; color: #3b4258; cursor: pointer; white-space: nowrap; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .12s ease; }
.jn-stop svg { width: 16px; height: 16px; flex: none; }
.jn-stop:hover { border-color: #14213d; }
.jn-stop:active { transform: scale(.96); }
.jn-stop.done { background: #f6efe0; }
.jn-stop.on { color: #fff; border-color: transparent; }
.jn-stop.jn-discovery.on { background: #0e9fa2; }
.jn-stop.jn-development.on { background: #6a4de0; }

@media (max-width: 900px) { .jn-player { grid-template-columns: 1fr; } .jn-scene { max-width: 560px; margin-inline: auto; } }
@media (max-width: 560px) {
  .jn-scene { border-radius: 22px; }
  .jn-head { padding: 56px 14px 18px; }
  .jn-head p { font-size: .82rem; }
  .jn-card { left: 58%; width: 39%; padding: 8px 10px 10px; border-radius: 13px; }
  .jn-info { padding: 20px; border-radius: 22px; }
  .jn-controls { flex-direction: column; align-items: stretch; }
  .jn-buttons { justify-content: center; }
  .jn-stop span { display: none; }
  .jn-stop { padding: 0 12px; }
  .jn-stop.on span { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .jn-stop, .jn-ctl, .jn-card { transition: none; } .jn-head.swap h3, .jn-head.swap p { animation: none; } }

.jn-music { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px 0 12px; border-radius: 999px; border: 1.5px solid #e7dfd0; background: #fff; color: #14213d; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.jn-music[hidden] { display: none; }
.jn-music:hover { border-color: #14213d; }
.jn-music:active { transform: scale(.96); }
.jn-music:focus-visible { outline: 3px solid #1747ca; outline-offset: 2px; }
.jn-music.on { background: #fff4de; border-color: #e0881a; color: #8a4b05; }
.jn-music-ico { display: grid; place-items: center; }
@media (prefers-reduced-motion: reduce) { .jn-music { transition: none; } }

/* The player is built by a script, so until it runs the space is kept free (invisible but taking its room): otherwise everything below it
   would jump down the moment it appears. Without JavaScript the head of every page hides it again (see the noscript rule in the layout). */
.jn-section[hidden] { display: block; visibility: hidden; min-height: 1130px; }
@media (max-width: 900px) { .jn-section[hidden] { min-height: 1430px; } }
