/* YADIM Timeline. Cards, fonts, buttons and filter buttons come from the Design tab; this is the structure. Mobile first: one column, the line on the left. */
.tl { position: relative; }
.tl-list { position: relative; display: flex; flex-direction: column; gap: var(--tl-gap, 40px); margin: 0; padding: 0; list-style: none; counter-reset: tl; }
.tl-item { position: relative; display: grid; grid-template-columns: var(--tl-ms, 18px) 1fr; column-gap: 20px; counter-increment: tl; }
.tl-item[hidden] { display: none; }
.tl-marker { position: relative; z-index: 2; grid-column: 1; grid-row: 1; box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: var(--tl-ms, 18px); height: var(--tl-ms, 18px); border-radius: 50%; background: var(--tl-mb, var(--tl-mc, #2a7de1)); color: var(--tl-sc, #fff); font: 600 calc(var(--tl-ms, 18px) * .5)/1 system-ui, sans-serif; box-shadow: 0 0 0 4px #fff; }
.tl-m-ring .tl-marker { background: var(--tl-mb, #fff); color: var(--tl-sc, var(--tl-mc, #2a7de1)); border: 3px solid var(--tl-mc, #2a7de1); box-shadow: none; }
.tl-m-number .tl-marker::before { content: counter(tl); }
.tl-m-symbol .tl-marker { font-size: calc(var(--tl-ms, 18px) * .6); } .tl-m-symbol .tl-sym { line-height: 1; }
.tl-sym-et { font-family: ETmodules, sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-transform: none; speak: none; }
:where(.tl-item.is-featured) .tl-marker { --tl-mc: var(--tl-fc, #e8590c); transform: scale(1.25); } /* the colour of a current event follows from --tl-mc; the Design tab can restyle every marker, or only this one */
.tl-card { grid-column: 2; grid-row: 1; box-sizing: border-box; min-width: 0; padding: 18px 20px; border-radius: 12px; background: #fff; border: 1px solid #e5e7eb; }
.tl-badge { display: inline-block; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px; background: var(--tl-fc, #e8590c); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tl-date { display: block; margin-bottom: 4px; font-size: .85em; font-weight: 600; color: var(--tl-mc, #2a7de1); letter-spacing: .02em; }
.tl-title { margin: 0 0 6px; font-size: 1.15em; line-height: 1.3; }
.tl-text { margin: 0; line-height: 1.55; }
.tl-media { margin: 8px 0; line-height: 0; } .tl-img { width: 100%; height: auto; border-radius: 8px; }
.tl-btn { display: inline-block; margin-top: 10px; padding: .45em 1em; border-radius: 6px; background: var(--tl-mc, #2a7de1); color: #fff; text-decoration: none; font-weight: 600; }
.tl-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* the line: vertical, along the markers */
.tl-list::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; left: calc(var(--tl-ms, 18px) / 2 - var(--tl-lw, 3px) / 2); width: var(--tl-lw, 3px); background: var(--tl-lc, #d0d7de); border-radius: 99px; }
.tl-line-dashed .tl-list::before { background: repeating-linear-gradient(to bottom, var(--tl-lc, #d0d7de) 0 9px, transparent 9px 16px); }
.tl-line-dotted .tl-list::before { background: repeating-linear-gradient(to bottom, var(--tl-lc, #d0d7de) 0 var(--tl-lw, 3px), transparent var(--tl-lw, 3px) calc(var(--tl-lw, 3px) * 3)); }
.tl-line-gradient .tl-list::before { background: linear-gradient(to bottom, var(--tl-mc, #2a7de1), var(--tl-lc, #d0d7de)); }
.tl-fill .tl-list::after { content: ""; position: absolute; z-index: 1; top: 0; left: calc(var(--tl-ms, 18px) / 2 - var(--tl-lw, 3px) / 2); width: var(--tl-lw, 3px); height: var(--tl-fill, 0%); background: var(--tl-mc, #2a7de1); border-radius: 99px; }

/* the filter */
.tl-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tl-fbtn { padding: .45em 1em; border: 1px solid #d0d7de; border-radius: 999px; background: #fff; color: inherit; font: inherit; cursor: pointer; }
.tl-fbtn[aria-pressed="true"] { background: var(--tl-mc, #2a7de1); border-color: var(--tl-mc, #2a7de1); color: #fff; }
.tl-fbtn:focus-visible, .tl-list:focus-visible { outline: 3px solid var(--tl-mc, #2a7de1); outline-offset: 2px; }

/* vertical, wide screens: alternating or on one side */
@media (min-width: 768px) {
  .tl-v.tl-l-alternate .tl-list::before, .tl-v.tl-l-alternate.tl-fill .tl-list::after { left: calc(50% - var(--tl-lw, 3px) / 2); }
  .tl-v.tl-l-alternate .tl-item { grid-template-columns: 1fr var(--tl-ms, 18px) 1fr; }
  .tl-v.tl-l-alternate .tl-marker { grid-column: 2; }
  .tl-v.tl-l-alternate .tl-item.tl-s-l .tl-card { grid-column: 1; text-align: right; }
  .tl-v.tl-l-alternate .tl-item.tl-s-r .tl-card { grid-column: 3; }
  .tl-v.tl-l-left .tl-list::before, .tl-v.tl-l-left.tl-fill .tl-list::after { left: auto; right: calc(var(--tl-ms, 18px) / 2 - var(--tl-lw, 3px) / 2); }
  .tl-v.tl-l-left .tl-item { grid-template-columns: 1fr var(--tl-ms, 18px); }
  .tl-v.tl-l-left .tl-marker { grid-column: 2; } .tl-v.tl-l-left .tl-card { grid-column: 1; text-align: right; }
}
/* horizontal: a row that scrolls sideways (always with "keep scrolling sideways", from 768px otherwise) */
.tl-h.tl-phone-scroll .tl-list { flex-direction: row; align-items: flex-start; gap: var(--tl-gap, 40px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 6px 6px 22px; }
@media (min-width: 768px) { .tl-h .tl-list { flex-direction: row; align-items: flex-start; gap: var(--tl-gap, 40px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 6px 6px 22px; } }
.tl-h.tl-phone-scroll .tl-list::before, .tl-h.tl-phone-scroll .tl-list::after { display: none; }
.tl-h.tl-phone-scroll .tl-item { display: flex; flex-direction: column; flex: 0 0 min(300px, 80vw); scroll-snap-align: start; }
.tl-h.tl-phone-scroll .tl-marker { margin-bottom: 18px; }
.tl-h.tl-phone-scroll .tl-item::before { content: ""; position: absolute; z-index: 0; top: calc(var(--tl-ms, 18px) / 2 - var(--tl-lw, 3px) / 2); left: 0; right: calc(var(--tl-gap, 40px) * -1); height: var(--tl-lw, 3px); background: var(--tl-lc, #d0d7de); }
.tl-h.tl-phone-scroll .tl-item:last-child::before { right: 0; }
@media (min-width: 768px) {
  .tl-h .tl-list::before, .tl-h .tl-list::after { display: none; }
  .tl-h .tl-item { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 220px; max-width: 420px; scroll-snap-align: start; } /* the events share the row; only a timeline too long for the row scrolls */
  .tl-h .tl-marker { margin-bottom: 18px; }
  .tl-h .tl-item::before { content: ""; position: absolute; z-index: 0; top: calc(var(--tl-ms, 18px) / 2 - var(--tl-lw, 3px) / 2); left: 0; right: calc(var(--tl-gap, 40px) * -1); height: var(--tl-lw, 3px); background: var(--tl-lc, #d0d7de); }
  .tl-h .tl-item:last-child::before { right: 0; }
}
@media (max-width: 980px) { .tl-list { gap: var(--tl-gap-t, var(--tl-gap, 40px)); } }
@media (max-width: 767px) { .tl-list { gap: var(--tl-gap-m, var(--tl-gap-t, var(--tl-gap, 40px))); } }

/* snake: the events run along a row and the line turns back on the next row. The script puts each event in its cell (--tl-c, --tl-r), marks the rows that run
   right to left (tl-rtl) and draws the line into the carrier .tl-snk: the carrier is a box whose background is the line (the Design tab gives it a colour or a
   gradient) and an svg path is its mask. .tl-snk-r only carries the corner radius the Design tab sets for the turns. Without the script, and with one event
   per row, it is the vertical timeline of phones. */
.tl-snk, .tl-snk-r { display: none; }
.tl-sn .tl-list { --tl-n: var(--tl-cols, 3); --tl-g: var(--tl-gap, 40px); --tl-turn: 36px; }
@media (max-width: 980px) { .tl-sn .tl-list { --tl-n: var(--tl-cols-t, 2); --tl-g: var(--tl-gap-t, var(--tl-gap, 40px)); } }
@media (max-width: 767px) { .tl-sn .tl-list { --tl-n: var(--tl-cols-m, 1); --tl-g: var(--tl-gap-m, var(--tl-gap-t, var(--tl-gap, 40px))); } }
.tl-snaking .tl-list { display: grid; grid-template-columns: repeat(var(--tl-n, 3), minmax(0, 1fr)); gap: var(--tl-g); align-items: stretch; padding: 6px var(--tl-turn); }
.tl-snaking .tl-list::before, .tl-snaking .tl-list::after { display: none; }
.tl-snaking .tl-item { display: flex; flex-direction: column; grid-column: var(--tl-c); grid-row: var(--tl-r); }
.tl-snaking .tl-marker { margin: 0 auto 18px; }
.tl-snaking .tl-snk { display: block; position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 0; pointer-events: none; box-sizing: border-box; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: var(--tl-lc, #d0d7de); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.tl-snaking.tl-line-gradient .tl-snk { background: linear-gradient(to right, var(--tl-mc, #2a7de1), var(--tl-lc, #d0d7de)); }
.tl-snaking .tl-snk-r { display: block; position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden; border-radius: 999px; }

/* arrival (the script marks the events that wait) */
.tl-js .tl-item.tl-pre .tl-card, .tl-js .tl-item.tl-pre .tl-marker { opacity: 0; }
.tl-js .tl-item .tl-card, .tl-js .tl-item .tl-marker { transition: opacity var(--tl-dur, .6s) var(--tl-ease, ease-out), transform var(--tl-dur, .6s) var(--tl-ease, ease-out); }
.tl-js.tl-a-slide .tl-item.tl-s-l.tl-pre .tl-card { transform: translateX(-40px); } .tl-js.tl-a-slide .tl-item.tl-s-r.tl-pre .tl-card { transform: translateX(40px); }
.tl-js.tl-a-rise .tl-item.tl-pre .tl-card { transform: translateY(32px); }
.tl-js.tl-a-zoom .tl-item.tl-pre .tl-card { transform: scale(.9); }
@media (max-width: 767px) { .tl-js.tl-a-slide .tl-item.tl-s-l.tl-pre .tl-card, .tl-js.tl-a-slide .tl-item.tl-s-r.tl-pre .tl-card { transform: translateX(24px); } }
.tl-h.tl-a-slide .tl-item.tl-pre .tl-card, .tl-sn.tl-a-slide .tl-item.tl-pre .tl-card { transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) { .tl-js .tl-item .tl-card, .tl-js .tl-item .tl-marker { transition: none; } .tl-item.tl-pre .tl-card, .tl-item.tl-pre .tl-marker { opacity: 1 !important; transform: none !important; } }
