/*
 * DP Timeline. includes/timeline.php writes the entries; assets/timeline/timeline.js builds each style on top of them
 * (adding .dptl-ready). Without the script every style shows as a vertical list with a line and dots. Defaults use
 * :where(.dp-timeline) .x so Divi's own settings (fonts, spacing, Custom CSS) always win, while still beating the
 * theme's element reset.
 */
:where(.dp-timeline) {
  --dptl-accent: var(--dp-g-accent, #2c59fa);
  --dptl-on: #fff;
  --dptl-ink: var(--dp-g-heading, #060606);
  --dptl-card: #fff;
  --dptl-line: #e4e4e2;
  --dptl-radius: 20px;
  --dptl-media: 320px;
  --dptl-w: 420px;
  --dptl-top: 80px;
  --dptl-dot: 14px;
  --dptl-ease: cubic-bezier(.22, .8, .24, 1);
  position: relative;
  color: var(--dptl-ink);
}
.dp-timeline .dp-tl-pin { position: relative; }
.dp-timeline .dp-tl-track { position: relative; margin: 0; padding: 0; }
.dp-timeline .dp-tl-track > .dp-tl-item { position: relative; min-width: 0; margin: 0; }
/* Divi 4 wraps each entry in .et_pb_module_inner: let the entry stand in for it. */
.dp-timeline .dp-tl-item > .et_pb_module_inner { display: contents; }
.dp-tl-empty { display: none; margin: 0; padding: 40px 20px; text-align: center; opacity: .6; }
.dp-timeline.is-empty .dp-tl-empty { display: block; }

/* ---- the entry ---- */
.dp-tl-entry { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%; box-sizing: border-box; }
.dp-tl-dot { display: none; }
:where(.dp-timeline) .dp-tl-media { position: relative; overflow: hidden; margin: 0; padding: 0; border-radius: calc(var(--dptl-radius) * .75); background: var(--dptl-line); }
.dp-timeline .dp-tl-media img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; }
:where(.dp-timeline) .dp-tl-body { min-width: 0; margin: 0; padding: 0; }
:where(.dp-timeline) .dp-tl-date { margin: 0 0 8px; padding: 0; font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: .04em; color: var(--dptl-accent); }
:where(.dp-timeline) .dp-tl-title { margin: 0 0 10px; padding: 0; font-size: 24px; font-weight: 600; line-height: 1.2; color: inherit; }
:where(.dp-timeline) .dp-tl-text { margin: 0; padding: 0; font-size: 16px; line-height: 1.6; opacity: .78; }
:where(.dp-timeline) .dp-tl-text p { margin: 0 0 .8em; padding: 0; }
:where(.dp-timeline) .dp-tl-text p:last-child { margin-bottom: 0; }
:where(.dp-timeline) .dp-tl-text a { color: inherit; text-decoration: underline; }
:where(.dp-timeline) .dp-tl-actions { margin: 20px 0 0; padding: 0; }
:where(.dp-timeline) .dp-tl-btn {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 12px 22px; border: 0; border-radius: 999px;
  background: var(--dptl-accent); color: var(--dptl-on); font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none;
  transition: transform .25s var(--dptl-ease), box-shadow .25s;
}
.dp-timeline a.dp-tl-btn:hover { transform: translateY(-2px); box-shadow: var(--dp-sh, 0 10px 22px -12px var(--dptl-accent)); }

/* ---- the controls the engine adds ---- */
.dp-timeline .dp-tl-arrow {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin: 0; padding: 0;
  border: 1px solid var(--dptl-line); border-radius: 50%; background: var(--dptl-card); color: var(--dptl-ink); cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, opacity .25s;
}
.dp-timeline .dp-tl-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dp-timeline .dp-tl-arrow:hover:not(:disabled) { background: var(--dptl-accent); border-color: var(--dptl-accent); color: var(--dptl-on); }
.dp-timeline .dp-tl-arrow:disabled { opacity: .35; cursor: default; }
.dp-timeline .dp-tl-arrow:focus-visible, .dp-timeline .dp-tl-mark:focus-visible, .dp-timeline .dp-tl-pill:focus-visible { outline: 2px solid var(--dptl-accent); outline-offset: 3px; }

/* ================================================================ base list (every style without the script) and Vertical Line */
.dp-timeline:not(.dptl-ready) .dp-tl-track,
.dp-timeline[data-dptl-style="line"] .dp-tl-track { display: flex; flex-direction: column; gap: 40px; padding: 4px 0; }
.dp-timeline:not(.dptl-ready) .dp-tl-track::before,
.dp-timeline[data-dptl-style="line"] .dp-tl-track::before,
.dp-timeline[data-dptl-style="line"] .dp-tl-track::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--dptl-dot) / 2 - 1px); width: 2px; border-radius: 2px; background: var(--dptl-line);
}
.dp-timeline[data-dptl-style="line"] .dp-tl-track::after { background: var(--dptl-accent); transform: scaleY(var(--dptl-fill, 0)); transform-origin: top; }
.dp-timeline:not(.dptl-ready) .dp-tl-entry,
.dp-timeline[data-dptl-style="line"] .dp-tl-entry { padding-left: calc(var(--dptl-dot) + 28px); }
.dp-timeline:not(.dptl-ready) .dp-tl-dot,
.dp-timeline[data-dptl-style="line"] .dp-tl-dot {
  position: absolute; z-index: 1; top: 4px; left: 0; display: block; width: var(--dptl-dot); height: var(--dptl-dot); box-sizing: border-box;
  border: 2px solid var(--dptl-accent); border-radius: 50%; background: var(--dptl-card); transition: background-color .3s, transform .3s var(--dptl-ease);
}
.dp-timeline[data-dptl-style="line"] .dp-tl-item.is-past .dp-tl-dot { background: var(--dptl-accent); transform: scale(1.15); }
.dp-timeline:not(.dptl-ready) .dp-tl-media,
.dp-timeline[data-dptl-style="line"] .dp-tl-media { height: calc(var(--dptl-media) * .7); margin-bottom: 18px; }
.dp-timeline[data-dptl-style="line"] .dp-tl-entry > .dp-tl-media,
.dp-timeline[data-dptl-style="line"] .dp-tl-entry > .dp-tl-body { max-width: 560px; }
/* Fade in as they come up (only once the script is running, and never in the builder). */
.dp-timeline.dptl-reveal[data-dptl-style="line"] .dp-tl-item .dp-tl-media,
.dp-timeline.dptl-reveal[data-dptl-style="line"] .dp-tl-item :is(.dp-tl-body, .dp-tl-design) { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--dptl-ease), transform .7s var(--dptl-ease); }
.dp-timeline.dptl-reveal[data-dptl-style="line"] .dp-tl-item.is-in .dp-tl-media,
.dp-timeline.dptl-reveal[data-dptl-style="line"] .dp-tl-item.is-in :is(.dp-tl-body, .dp-tl-design) { opacity: 1; transform: none; }
.dp-timeline.dptl-reveal[data-dptl-style="line"] .dp-tl-item.is-in :is(.dp-tl-body, .dp-tl-design) { transition-delay: .08s; }

@media (min-width: 768px) {
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-track { gap: 56px; }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-track::before,
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-track::after { left: calc(50% - 1px); }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-item { width: 50%; }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-item:nth-child(odd) { align-self: flex-start; }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-item:nth-child(even) { align-self: flex-end; }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-item:nth-child(odd) .dp-tl-entry { align-items: flex-end; padding: 0 calc(var(--dptl-dot) / 2 + 40px) 0 0; text-align: right; }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-item:nth-child(even) .dp-tl-entry { padding: 0 0 0 calc(var(--dptl-dot) / 2 + 40px); }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-item:nth-child(odd) .dp-tl-dot { left: auto; right: calc(var(--dptl-dot) / -2); }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-item:nth-child(even) .dp-tl-dot { left: calc(var(--dptl-dot) / -2); }
  .dp-timeline[data-dptl-style="line"][data-dptl-sides="alternate"] .dp-tl-media { width: 100%; }
}

/* ================================================================ Ruler */
.dp-tl-head { position: relative; margin: 0 0 40px; }
:where(.dp-timeline) .dp-tl-year {
  position: relative; overflow: hidden; height: 1.05em; margin: 0 0 24px; padding: 0; font-size: clamp(56px, 11vw, 140px); font-weight: 700;
  line-height: 1.05; letter-spacing: -.04em; text-align: center; color: var(--dptl-ink);
}
.dp-tl-year > span { position: absolute; inset: 0; display: block; white-space: nowrap; transition: transform .6s var(--dptl-ease), opacity .6s; }
.dp-tl-year > span.is-from-below { transform: translateY(100%); opacity: 0; }
.dp-tl-year > span.is-from-above { transform: translateY(-100%); opacity: 0; }
.dp-tl-ruler {
  position: relative; overflow: hidden; height: 78px; margin: 0; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.dp-tl-ruler.is-dragging { cursor: grabbing; }
.dp-tl-scale {
  --dptl-sp: 140px;
  position: absolute; top: 0; left: 50%; height: 100%; width: calc((var(--dptl-n, 1) - 1) * var(--dptl-sp) + 2 * var(--dptl-sp));
  margin-left: calc(var(--dptl-sp) * -1); will-change: transform;
  background-image: repeating-linear-gradient(90deg, var(--dptl-line) 0 1px, transparent 1px var(--dptl-tg, 100%));
  background-size: 100% 14px; background-repeat: no-repeat; background-position: 0 0;
  transition: transform .7s var(--dptl-ease);
}
.dp-tl-ruler.is-dragging .dp-tl-scale { transition: none; }
.dp-timeline .dp-tl-mark {
  position: absolute; top: 0; left: calc(var(--dptl-sp) + var(--i) * var(--dptl-sp)); display: flex; flex-direction: column; align-items: center;
  width: 120px; margin: 0 0 0 -60px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
.dp-tl-mark::before { content: ""; display: block; width: 2px; height: 28px; border-radius: 2px; background: var(--dptl-ink); opacity: .35; transition: opacity .3s, background-color .3s; }
:where(.dp-timeline) .dp-tl-mark-label { display: block; margin: 10px 0 0; padding: 0; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; opacity: .5; transition: opacity .3s, color .3s; }
.dp-tl-mark.is-active::before { background: var(--dptl-accent); opacity: 1; }
.dp-tl-mark.is-active .dp-tl-mark-label { color: var(--dptl-accent); opacity: 1; }
.dp-tl-mark:hover .dp-tl-mark-label { opacity: 1; }
.dp-tl-needle { position: absolute; z-index: 2; top: -4px; left: 50%; width: 2px; height: 40px; margin-left: -1px; border-radius: 2px; background: var(--dptl-accent); pointer-events: none; }
.dp-tl-needle::before { content: ""; position: absolute; top: 0; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--dptl-accent); }
.dp-tl-nav { display: flex; justify-content: center; gap: 12px; margin: 22px 0 0; }

.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-track,
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-track { display: grid; grid-template-columns: minmax(0, 1fr); }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-track > .dp-tl-item,
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-track > .dp-tl-item { grid-area: 1 / 1; }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-item { visibility: hidden; pointer-events: none; transition: visibility 0s .7s; }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-item.is-active { visibility: visible; pointer-events: auto; transition: none; }
.dp-timeline[data-dptl-style="ruler"] .dp-tl-entry.has-media { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.dp-timeline[data-dptl-style="ruler"] .dp-tl-entry:not(.has-media) { justify-content: center; max-width: 720px; margin: 0 auto; text-align: center; }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-media { height: var(--dptl-media); }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-date { display: none; }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-media,
.dp-timeline.dptl-ready[data-dptl-style="ruler"] :is(.dp-tl-body, .dp-tl-design) { opacity: 0; transition: opacity .5s, transform .7s var(--dptl-ease), clip-path .8s var(--dptl-ease); }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-media { clip-path: inset(0 0 0 100% round calc(var(--dptl-radius) * .75)); }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] :is(.dp-tl-body, .dp-tl-design) { transform: translateY(18px); }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-item.is-active .dp-tl-media { opacity: 1; clip-path: inset(0 0 0 0 round calc(var(--dptl-radius) * .75)); }
.dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-item.is-active :is(.dp-tl-body, .dp-tl-design) { opacity: 1; transform: none; transition-delay: .15s; }
.dp-timeline.dptl-ready[data-dptl-style="ruler"].is-back .dp-tl-media { clip-path: inset(0 100% 0 0 round calc(var(--dptl-radius) * .75)); }
.dp-timeline.dptl-ready[data-dptl-style="ruler"].is-back .dp-tl-item.is-active .dp-tl-media { clip-path: inset(0 0 0 0 round calc(var(--dptl-radius) * .75)); }
@media (max-width: 767px) {
  .dp-timeline[data-dptl-style="ruler"] .dp-tl-entry.has-media { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dp-timeline.dptl-ready[data-dptl-style="ruler"] .dp-tl-media { height: calc(var(--dptl-media) * .75); }
  .dp-tl-scale { --dptl-sp: 104px; }
  .dp-tl-head { margin-bottom: 28px; }
}

/* ================================================================ Spotlight */
.dp-tl-spot { display: none; }
@media (min-width: 981px) {
  .dp-timeline.dptl-ready.has-spot[data-dptl-style="spotlight"] .dp-tl-pin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
  .dp-timeline.dptl-ready.has-spot[data-dptl-style="spotlight"] .dp-tl-spot {
    position: sticky; top: var(--dptl-top); display: block; overflow: hidden; height: min(var(--dptl-media) * 1.6, 100vh - var(--dptl-top) - 40px);
    border-radius: var(--dptl-radius); background: var(--dptl-line);
  }
  .dp-timeline.dptl-ready.has-spot[data-dptl-style="spotlight"] .dp-tl-entry .dp-tl-media { display: none; }
}
.dp-tl-spot img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .7s, transform 1.2s var(--dptl-ease); }
.dp-tl-spot img.is-active { opacity: 1; transform: none; }
.dp-timeline[data-dptl-style="spotlight"] .dp-tl-track { display: flex; flex-direction: column; }
.dp-timeline.dptl-ready[data-dptl-style="spotlight"] .dp-tl-track::before { content: none; }
.dp-timeline.dptl-ready[data-dptl-style="spotlight"] .dp-tl-entry { padding: 7vh 0; opacity: var(--dptl-a, 1); transform: scale(var(--dptl-s, 1)); transform-origin: left center; transition: opacity .25s linear, transform .25s linear; }
.dp-timeline.dptl-ready[data-dptl-style="spotlight"] .dp-tl-dot { display: none; }
.dp-timeline.dptl-ready[data-dptl-style="spotlight"] .dp-tl-date { font-size: clamp(40px, 6vw, 84px); font-weight: 700; line-height: 1; letter-spacing: -.03em; margin-bottom: 18px; }
.dp-timeline.dptl-ready[data-dptl-style="spotlight"] .dp-tl-media { height: calc(var(--dptl-media) * .8); margin-bottom: 22px; }
.dp-timeline.dptl-ready.dptl-builder[data-dptl-style="spotlight"] .dp-tl-entry { opacity: 1; transform: none; }

/* ================================================================ Deck */
.dp-tl-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 32px; padding: 0; }
.dp-timeline .dp-tl-pill {
  margin: 0; padding: 8px 16px; border: 1px solid var(--dptl-line); border-radius: 999px; background: none; color: inherit; font: inherit;
  font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s;
}
.dp-timeline .dp-tl-pill[aria-pressed="true"] { border-color: var(--dptl-accent); background: var(--dptl-accent); color: var(--dptl-on); }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-pin { padding-bottom: 46px; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-track { justify-items: center; touch-action: pan-y; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-item {
  --o: 0;
  width: min(var(--dptl-w), 100%); z-index: calc(50 - var(--o)); transform-origin: 50% 100%;
  transform: translateY(calc(var(--o) * 16px)) scale(calc(1 - var(--o) * .05));
  transition: transform .7s var(--dptl-ease), opacity .5s, visibility 0s;
}
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-item.is-behind { pointer-events: none; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-item.is-gone { opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-70%, 30px) rotate(-10deg); transition: transform .7s var(--dptl-ease), opacity .5s, visibility 0s .7s; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-item.is-far { opacity: 0; visibility: hidden; transition: transform .7s var(--dptl-ease), opacity .5s, visibility 0s .5s; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-track.is-dragging .dp-tl-item { transition: none; }
.dp-timeline[data-dptl-style="deck"] .dp-tl-entry { overflow: hidden; border: 1px solid var(--dptl-line); border-radius: var(--dptl-radius); background: var(--dptl-card); box-shadow: var(--dp-sh, 0 24px 50px -30px rgba(6, 6, 6, .35)); }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-media { flex: 0 0 auto; height: calc(var(--dptl-media) * .75); border-radius: 0; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-body { padding: 26px 28px 30px; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-dot { display: none; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-item.is-behind .dp-tl-entry > * { opacity: calc(1 - var(--o) * .25); transition: opacity .5s; }
.dp-timeline.dptl-ready[data-dptl-style="deck"] .dp-tl-nav { margin-top: 24px; }

/* ================================================================ Horizontal Scroll */
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-track {
  display: flex; gap: 32px; padding: 0 0 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-item { flex: 0 0 min(var(--dptl-w), 86vw); scroll-snap-align: start; padding-top: 40px; }
/* The line runs along the top of every entry and on through the gap to the next one. It fills with the same
 * progress as the bar below (the engine sets --dptl-seg, 0 to 1, on each entry). */
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-item::before {
  content: ""; position: absolute; top: calc(var(--dptl-dot) / 2 - 1px); left: 0; right: -32px; height: 2px; background: var(--dptl-line);
  background-image: linear-gradient(var(--dptl-accent), var(--dptl-accent)); background-repeat: no-repeat;
  background-size: calc(var(--dptl-seg, 0) * 100%) 100%;
}
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-item:last-child::before { right: 0; }
/* The dots sit on the line (inside the entry's top padding), so they never reach into the section above. */
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-dot {
  position: absolute; z-index: 1; top: 0; left: 0; display: block; width: var(--dptl-dot); height: var(--dptl-dot); box-sizing: border-box;
  border: 2px solid var(--dptl-accent); border-radius: 50%; background: var(--dptl-card); transition: background-color .3s;
}
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-item.is-past .dp-tl-dot,
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-item.is-active .dp-tl-dot { background: var(--dptl-accent); }
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-entry { position: static; }
.dp-timeline.dptl-ready[data-dptl-style="scroll"] .dp-tl-media { flex: 0 0 auto; height: calc(var(--dptl-media) * .85); margin-bottom: 20px; }
/* Pinned: the page scroll moves the entries sideways (wide screens, motion allowed, not in the builder). */
.dp-timeline.dptl-pin[data-dptl-style="scroll"] { overflow-x: clip; overflow-clip-margin: 60px; }
.dp-timeline.dptl-pin[data-dptl-style="scroll"] .dp-tl-pin { position: sticky; top: var(--dptl-top); overflow: visible; }
/* Held in the middle or at the bottom of the screen (the engine sets --dptl-ph to the timeline's height). Never above
 * the top of the screen when the timeline is taller than the space. */
.dp-timeline.dptl-pin[data-dptl-style="scroll"][data-dptl-pinat="middle"] .dp-tl-pin { top: max(0px, calc(50vh - var(--dptl-ph, 0px) / 2)); }
.dp-timeline.dptl-pin[data-dptl-style="scroll"][data-dptl-pinat="bottom"] .dp-tl-pin { top: max(0px, calc(100vh - var(--dptl-ph, 0px) - var(--dptl-top))); }
.dp-timeline.dptl-pin[data-dptl-style="scroll"] .dp-tl-track { overflow: visible; scroll-snap-type: none; will-change: transform; }
.dp-tl-progress { display: none; }
.dp-timeline.dptl-pin[data-dptl-style="scroll"] .dp-tl-progress { position: relative; display: block; height: 2px; margin: 28px 0 0; background: var(--dptl-line); }
.dp-timeline.dptl-nobar .dp-tl-progress { display: none !important; }
.dp-timeline.dptl-pin[data-dptl-style="scroll"] .dp-tl-progress > span { position: absolute; inset: 0; background: var(--dptl-accent); transform: scaleX(var(--dptl-p, 0)); transform-origin: left; }

/* ================================================================ Entry Design
 * Set to a Library layout or canvas: each entry keeps its dot and date (the styles draw the line, ruler and pills
 * from them) and the user's design takes the place of the photo and text, in .dp-tl-design. The styles place and
 * size it as they do the built-in text; the design's own alignment and colours show. */
.dp-tl-entry.dp-entry-custom > .dp-tl-design { box-sizing: border-box; width: 100%; min-width: 0; text-align: start; }
.dp-timeline[data-dptl-style="line"] .dp-tl-entry > .dp-tl-design { max-width: 560px; }
.dp-timeline[data-dptl-style="ruler"] .dp-tl-entry.dp-entry-custom { display: flex; max-width: none; }
.dp-timeline .dp-entry-custom .dp-entry-wrap.dp-entry-wrap.dp-entry-wrap { all: unset; }
.dp-timeline .dp-entry-custom .dp-entry-wrap.dp-entry-wrap::before,
.dp-timeline .dp-entry-custom .dp-entry-wrap.dp-entry-wrap::after { content: none; }
/* A background set under Design > Entries (dp-bg-tlentry) or in an entry's own Background (dp-bg-module) replaces
 * the backgrounds of the design's sections and rows, which would otherwise cover it. */
:is(.dp-bg-tlentry .dp-tl-item, .dp-tl-item.dp-bg-module) .dp-entry-custom :is(.et_pb_section, .et_pb_row):not(#dp#dp) { background: none !important; background-color: transparent !important; background-image: none !important; }
:is(.dp-bg-tlentry .dp-tl-item, .dp-tl-item.dp-bg-module) .dp-entry-custom :is(.et_pb_section, .et_pb_row) > :is(.et_parallax_bg_wrap, .et_pb_section_video_bg, .et_pb_background_pattern, .et_pb_background_mask) { display: none !important; }

/* The first build (and every rebuild) jumps straight to its starting state. */
.dp-timeline.dptl-init *, .dp-timeline.dptl-init *::before, .dp-timeline.dptl-init *::after { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .dp-timeline *, .dp-timeline *::before, .dp-timeline *::after { transition-duration: 0s !important; transition-delay: 0s !important; }
}

/* Built-In Shadows off (the module's dp-noshadow class): the blurred shadows above use these. */
.dp-noshadow { --dp-sh: none; --dp-sh-o: 0 0 #0000; }

/* A Box Shadow chosen for this element in the Design tab (None included) replaces its built-in shadow. */
.dp-sh-tlentry .dp-tl-entry, .dp-sh-buttonfont .dp-tl-btn { --dp-sh: none; --dp-sh-o: 0 0 #0000; }

/* Background defaults for the elements with a Background setting in the Design tab, as Divi gives its own
   modules (Cover, centred, no repeat): Divi only prints these when they are changed. Low priority, so any value set wins. */
:where(.dp-tl-btn, .dp-tl-entry, .dp-tl-dot):not(#dp) { background-size: cover; background-position: 50%; background-repeat: no-repeat; }
