:where(.tlm) {
  --tlm-accent: #b43f3f;
  --tlm-bg: #f6f4ef;
  --tlm-surface: #ffffff;
  --tlm-text: #23262d;
  --tlm-muted: #656c7a;
  --tlm-line: #d8d2c5;
  color: var(--tlm-text);
  display: grid;
  gap: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tlm * {
  box-sizing: border-box;
}

.tlm__header {
  max-width: 860px;
}

.tlm__header h2 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.98;
  margin: 0 0 12px;
}

.tlm__header p {
  color: var(--tlm-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.tlm__viewport {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.tlm__rail {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
}

.tlm__era {
  background: color-mix(in srgb, var(--tlm-accent), white 86%);
  border-left: 4px solid var(--tlm-accent);
  color: #4a2525;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 10px;
}

.tlm__markers {
  border-left: 2px solid var(--tlm-line);
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
}

.tlm__markers a {
  color: var(--tlm-text);
  display: grid;
  gap: 3px;
  line-height: 1.25;
  padding: 5px 0;
  text-decoration: none;
}

.tlm__markers a::before {
  background: var(--tlm-accent);
  border: 3px solid var(--tlm-bg);
  border-radius: 999px;
  content: "";
  height: 13px;
  margin-left: -21.5px;
  margin-top: 2px;
  position: absolute;
  width: 13px;
}

.tlm__markers span {
  color: var(--tlm-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tlm__slides {
  display: grid;
  gap: 20px;
}

.tlm__slide {
  background: var(--tlm-surface);
  border: 1px solid var(--tlm-line);
  display: grid;
  grid-template-columns: minmax(180px, 42%) minmax(0, 1fr);
  min-height: 360px;
}

.tlm__media {
  background: #e8e1d6;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  margin: 0;
  min-height: 260px;
}

.tlm__media:empty::before {
  align-self: center;
  color: #8a8176;
  content: "Timeline";
  font-size: 1.4rem;
  font-weight: 800;
  justify-self: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tlm__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tlm__media a {
  align-self: center;
  color: var(--tlm-accent);
  font-weight: 800;
  justify-self: center;
  padding: 24px;
  overflow-wrap: anywhere;
}

.tlm__media figcaption {
  color: var(--tlm-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 8px 10px;
}

.tlm__body {
  align-content: center;
  display: grid;
  gap: 12px;
  padding: clamp(22px, 4vw, 46px);
}

.tlm__body time {
  color: var(--tlm-accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tlm__body h3 {
  font-size: clamp(1.55rem, 3vw, 3rem);
  line-height: 1;
  margin: 0;
}

.tlm__text {
  color: #3e4653;
  font-size: 1rem;
  line-height: 1.65;
}

.tlm__text > :first-child {
  margin-top: 0;
}

.tlm__text > :last-child {
  margin-bottom: 0;
}

.tlm__overlays {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tlm__overlays li {
  --tlm-overlay-color: var(--tlm-accent);
  align-items: baseline;
  border: 1px solid color-mix(in srgb, var(--tlm-overlay-color), white 65%);
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  max-width: 100%;
  padding: 5px 9px;
}

.tlm__overlays span {
  color: var(--tlm-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tlm__overlays strong {
  color: var(--tlm-text);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.tlm__group {
  color: var(--tlm-muted);
  font-size: 0.85rem;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .tlm__viewport {
    grid-template-columns: 1fr;
  }

  .tlm__rail {
    position: static;
  }

  .tlm__markers {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 0 10px;
    border-left: 0;
    border-bottom: 2px solid var(--tlm-line);
  }

  .tlm__markers li {
    min-width: 150px;
  }

  .tlm__markers a::before {
    display: none;
  }

  .tlm__slide {
    grid-template-columns: 1fr;
  }
}
